Commit 3fddfee6 authored by Stephane Nicoll's avatar Stephane Nicoll

Fix default value of endpoint's cache ttl

Closes gh-12173
parent 56c8bf74
......@@ -438,7 +438,7 @@ public class ConfigurationMetadataAnnotationProcessor extends AbstractProcessor
if (hasMainReadOperation(element)) {
this.metadataCollector.add(ItemMetadata.newProperty(endpointKey,
"cache.time-to-live", Duration.class.getName(), type, null,
"Maximum time that a response can be cached.", 0, null));
"Maximum time that a response can be cached.", "0ms", null));
}
}
......
......@@ -706,7 +706,7 @@ public class ConfigurationMetadataAnnotationProcessorTests {
private Metadata.MetadataItemCondition cacheTtl(String endpointId) {
return Metadata
.withProperty("management.endpoint." + endpointId + ".cache.time-to-live")
.ofType(Duration.class).withDefaultValue(0)
.ofType(Duration.class).withDefaultValue("0ms")
.withDescription("Maximum time that a response can be cached.");
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment