mirror of
https://github.com/spring-projects/spring-boot.git
synced 2026-09-26 11:39:14 +00:00
Fix default value of endpoint's cache ttl
Closes gh-12173
This commit is contained in:
+1
-1
@@ -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));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -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.");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user