diff --git a/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/endpoint/EndpointIdTimeToLivePropertyFunctionTests.java b/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/endpoint/EndpointIdTimeToLivePropertyFunctionTests.java index 5421cf78ab..994f395ac9 100644 --- a/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/endpoint/EndpointIdTimeToLivePropertyFunctionTests.java +++ b/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/endpoint/EndpointIdTimeToLivePropertyFunctionTests.java @@ -46,15 +46,18 @@ public class EndpointIdTimeToLivePropertyFunctionTests { @Test public void userConfiguration() { - this.environment.setProperty( - "management.endpoint.another-test.cache.time-to-live", "500"); - Long result = this.timeToLive.apply(EndpointId.of("anotherTest")); + this.environment.setProperty("management.endpoint.test.cache.time-to-live", + "500"); + Long result = this.timeToLive.apply(EndpointId.of("test")); assertThat(result).isEqualTo(500L); } @Test public void mixedCaseUserConfiguration() { - + this.environment.setProperty( + "management.endpoint.another-test.cache.time-to-live", "500"); + Long result = this.timeToLive.apply(EndpointId.of("anotherTest")); + assertThat(result).isEqualTo(500L); } } diff --git a/spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/EndpointId.java b/spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/EndpointId.java index 755888dbd4..67b07aa330 100644 --- a/spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/EndpointId.java +++ b/spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/EndpointId.java @@ -103,8 +103,8 @@ public final class EndpointId { } /** - * Factory method to create a new {@link EndpointId} from a property value. Is more - * lenient that {@link #of(String)} to allow for common "relaxed" property variants. + * Factory method to create a new {@link EndpointId} from a property value. More + * lenient than {@link #of(String)} to allow for common "relaxed" property variants. * @param value the property value to convert * @return an {@link EndpointId} instance */