From cb0c6843d2231860ebe6e58ca70fde745cd503b6 Mon Sep 17 00:00:00 2001 From: izeye Date: Tue, 21 Jul 2015 16:34:35 +0900 Subject: [PATCH] Remove default paths in HAL and Links endpoints as value varies The default values of fields in @ConfigurationProperties classes are, where possible, included in the configuration metadata. The default values for the HAL and Links endpoints vary depending on other configuration settings. As a result, including a default in the metadata is misleading. This commit removes the default assignment of "" to the path fields so that no default value will be included in the metadata. Closes gh-3567 --- .../boot/actuate/endpoint/mvc/HalBrowserEndpoint.java | 2 +- .../boot/actuate/endpoint/mvc/LinksMvcEndpoint.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/mvc/HalBrowserEndpoint.java b/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/mvc/HalBrowserEndpoint.java index 6f0add7db9..4f28ff61e8 100644 --- a/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/mvc/HalBrowserEndpoint.java +++ b/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/mvc/HalBrowserEndpoint.java @@ -38,7 +38,7 @@ public class HalBrowserEndpoint extends WebMvcConfigurerAdapter implements MvcEn private static final String HAL_BROWSER_LOCATION = "classpath:/META-INF/resources/webjars/hal-browser/" + HAL_BROWSER_VERSION + "/"; - private String path = ""; + private String path; private ManagementServerProperties management; diff --git a/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/mvc/LinksMvcEndpoint.java b/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/mvc/LinksMvcEndpoint.java index baab0c22be..5ad0fad831 100644 --- a/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/mvc/LinksMvcEndpoint.java +++ b/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/mvc/LinksMvcEndpoint.java @@ -32,7 +32,7 @@ import org.springframework.web.bind.annotation.ResponseBody; @ConfigurationProperties("endpoints.links") public class LinksMvcEndpoint implements MvcEndpoint { - private String path = ""; + private String path; private boolean sensitive = false; public LinksMvcEndpoint(String defaultPath) {