diff --git a/spring-boot-actuator-docs/src/main/asciidoc/index.adoc b/spring-boot-actuator-docs/src/main/asciidoc/index.adoc index 78112b7ca2..1111101404 100644 --- a/spring-boot-actuator-docs/src/main/asciidoc/index.adoc +++ b/spring-boot-actuator-docs/src/main/asciidoc/index.adoc @@ -54,7 +54,7 @@ Example enhanced "/metrics" endpoint with additional "_links": include::{generated}/metrics/hypermedia/http-response.adoc[] WARNING: Beware of Actuator endpoint paths clashing with application endpoints. -The easiest way to avoid that is to use a `management.contextPath`, e.g. "/admin". +The easiest way to avoid that is to use a `management.context-path`, e.g. "/admin". TIP: You can disable the hypermedia support in Actuator endpoints by setting `endpoints.links.enabled=false`. @@ -62,13 +62,13 @@ TIP: You can disable the hypermedia support in Actuator endpoints by setting === Default home page -If the `management.contextPath` is empty, or if the home page provided by the application +If the `management.context-path` is empty, or if the home page provided by the application happens to be a response body of type `ResourceSupport`, then it will be enhanced with links to the actuator endpoints. The latter would happen for instance if you use Spring Data REST to expose `Repository` endpoints. -Example vanilla "/" endpoint if the `management.contextPath` is empty (the "/admin" page -would be the same with different links if `management.contextPath=/admin`): +Example vanilla "/" endpoint if the `management.context-path` is empty (the "/admin" page +would be the same with different links if `management.context-path=/admin`): include::{generated}/admin/http-response.adoc[] @@ -115,10 +115,10 @@ NOTE: if you are using Spring Data REST, then a dependency on the `spring-data-rest-hal-browser` will have an equivalent effect. If you do that then a new endpoint will appear at `/` or `/hal` (relative to the -`management.contextPath`) serving up a static HTML page with some JavaScript that lets you +`management.context-path`) serving up a static HTML page with some JavaScript that lets you browse the available resources. The default endpoint path depends on whether or not there is already a static home page ("`index.html`") - if there is not and the -`management.contextPath` is empty, then the HAL browser shows up on the home page. +`management.context-path` is empty, then the HAL browser shows up on the home page. Example: @@ -155,7 +155,7 @@ or in Gradle ---- If you do that then a new endpoint at `/` or `/docs` (relative to the -`management.contextPath`) will serve up a static HTML page with this documentation in it. +`management.context-path`) will serve up a static HTML page with this documentation in it. The default endpoint path depends on whether or not there is already a static home page -("index.html" or a HAL browser) - if there is not and the `management.contextPath` is +("index.html" or a HAL browser) - if there is not and the `management.context-path` is empty, then the docs browser shows up on the home page. diff --git a/spring-boot-actuator-docs/src/test/resources/application.properties b/spring-boot-actuator-docs/src/test/resources/application.properties index 6cd849878a..0451d822f5 100644 --- a/spring-boot-actuator-docs/src/test/resources/application.properties +++ b/spring-boot-actuator-docs/src/test/resources/application.properties @@ -1,2 +1,2 @@ -# management.contextPath=/admin +# management.context-path=/admin logging.path: target/logs \ No newline at end of file diff --git a/spring-boot-samples/spring-boot-sample-actuator/src/test/java/sample/actuator/ManagementAddressActuatorApplicationTests.java b/spring-boot-samples/spring-boot-sample-actuator/src/test/java/sample/actuator/ManagementAddressActuatorApplicationTests.java index 59210db11d..e236f8fa34 100644 --- a/spring-boot-samples/spring-boot-sample-actuator/src/test/java/sample/actuator/ManagementAddressActuatorApplicationTests.java +++ b/spring-boot-samples/spring-boot-sample-actuator/src/test/java/sample/actuator/ManagementAddressActuatorApplicationTests.java @@ -44,7 +44,7 @@ import static org.junit.Assert.assertTrue; @SpringApplicationConfiguration(classes = SampleActuatorApplication.class) @WebAppConfiguration @IntegrationTest({ "server.port=0", "management.port=0", "management.address=127.0.0.1", - "management.contextPath:/admin" }) + "management.context-path:/admin" }) @DirtiesContext public class ManagementAddressActuatorApplicationTests { diff --git a/spring-boot-samples/spring-boot-sample-actuator/src/test/resources/application-endpoints.properties b/spring-boot-samples/spring-boot-sample-actuator/src/test/resources/application-endpoints.properties index 5777970602..5c24a2ad93 100644 --- a/spring-boot-samples/spring-boot-sample-actuator/src/test/resources/application-endpoints.properties +++ b/spring-boot-samples/spring-boot-sample-actuator/src/test/resources/application-endpoints.properties @@ -1,3 +1,3 @@ error.path: /oops -management.contextPath: /admin +management.context-path: /admin endpoints.health.sensitive: false \ No newline at end of file diff --git a/spring-boot-samples/spring-boot-sample-hypermedia-gson/src/main/resources/application.properties b/spring-boot-samples/spring-boot-sample-hypermedia-gson/src/main/resources/application.properties index ef0f024d90..0ed692da14 100644 --- a/spring-boot-samples/spring-boot-sample-hypermedia-gson/src/main/resources/application.properties +++ b/spring-boot-samples/spring-boot-sample-hypermedia-gson/src/main/resources/application.properties @@ -1,2 +1,2 @@ -# management.contextPath=/admin +# management.context-path=/admin spring.http.converters.preferred-json-mapper: gson \ No newline at end of file diff --git a/spring-boot-samples/spring-boot-sample-hypermedia-jpa/src/main/resources/application.properties b/spring-boot-samples/spring-boot-sample-hypermedia-jpa/src/main/resources/application.properties index 31e1ded85d..0bc7f732df 100644 --- a/spring-boot-samples/spring-boot-sample-hypermedia-jpa/src/main/resources/application.properties +++ b/spring-boot-samples/spring-boot-sample-hypermedia-jpa/src/main/resources/application.properties @@ -1,2 +1,2 @@ -management.contextPath=/admin +management.context-path=/admin endpoints.docs.curies.enabled=true \ No newline at end of file diff --git a/spring-boot-samples/spring-boot-sample-hypermedia-jpa/src/test/java/sample/hypermedia/jpa/SampleHypermediaJpaApplicationCustomLinksPathIntegrationTests.java b/spring-boot-samples/spring-boot-sample-hypermedia-jpa/src/test/java/sample/hypermedia/jpa/SampleHypermediaJpaApplicationCustomLinksPathIntegrationTests.java index b3fda2ccb8..eb0391a594 100644 --- a/spring-boot-samples/spring-boot-sample-hypermedia-jpa/src/test/java/sample/hypermedia/jpa/SampleHypermediaJpaApplicationCustomLinksPathIntegrationTests.java +++ b/spring-boot-samples/spring-boot-sample-hypermedia-jpa/src/test/java/sample/hypermedia/jpa/SampleHypermediaJpaApplicationCustomLinksPathIntegrationTests.java @@ -40,7 +40,7 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers. @WebAppConfiguration @SpringApplicationConfiguration(classes = SampleHypermediaJpaApplication.class) @DirtiesContext -@TestPropertySource(properties = { "debug=true", "management.contextPath=", +@TestPropertySource(properties = { "debug=true", "management.context-path=", "endpoints.docs.curies.enabled=false" }) public class SampleHypermediaJpaApplicationCustomLinksPathIntegrationTests { diff --git a/spring-boot-samples/spring-boot-sample-hypermedia-jpa/src/test/java/sample/hypermedia/jpa/SampleHypermediaJpaApplicationSharedRootIntegrationTests.java b/spring-boot-samples/spring-boot-sample-hypermedia-jpa/src/test/java/sample/hypermedia/jpa/SampleHypermediaJpaApplicationSharedRootIntegrationTests.java index 1b94e35b2f..1f5d333a8a 100644 --- a/spring-boot-samples/spring-boot-sample-hypermedia-jpa/src/test/java/sample/hypermedia/jpa/SampleHypermediaJpaApplicationSharedRootIntegrationTests.java +++ b/spring-boot-samples/spring-boot-sample-hypermedia-jpa/src/test/java/sample/hypermedia/jpa/SampleHypermediaJpaApplicationSharedRootIntegrationTests.java @@ -41,7 +41,7 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers. @SpringApplicationConfiguration(classes = SampleHypermediaJpaApplication.class) @DirtiesContext @TestPropertySource(properties = { "endpoints.links.path=/admin", - "management.contextPath=", "endpoints.docs.curies.enabled=false" }) + "management.context-path=", "endpoints.docs.curies.enabled=false" }) public class SampleHypermediaJpaApplicationSharedRootIntegrationTests { @Autowired diff --git a/spring-boot-samples/spring-boot-sample-hypermedia-ui/src/main/resources/application.properties b/spring-boot-samples/spring-boot-sample-hypermedia-ui/src/main/resources/application.properties index 560a46ccde..8ccf953870 100644 --- a/spring-boot-samples/spring-boot-sample-hypermedia-ui/src/main/resources/application.properties +++ b/spring-boot-samples/spring-boot-sample-hypermedia-ui/src/main/resources/application.properties @@ -1 +1 @@ -management.contextPath=/admin \ No newline at end of file +management.context-path=/admin \ No newline at end of file diff --git a/spring-boot-samples/spring-boot-sample-hypermedia-ui/src/test/java/sample/hypermedia/ui/SampleHypermediaUiApplicationTests.java b/spring-boot-samples/spring-boot-sample-hypermedia-ui/src/test/java/sample/hypermedia/ui/SampleHypermediaUiApplicationTests.java index abc69e5a59..1c644735d4 100644 --- a/spring-boot-samples/spring-boot-sample-hypermedia-ui/src/test/java/sample/hypermedia/ui/SampleHypermediaUiApplicationTests.java +++ b/spring-boot-samples/spring-boot-sample-hypermedia-ui/src/test/java/sample/hypermedia/ui/SampleHypermediaUiApplicationTests.java @@ -39,7 +39,7 @@ import static org.junit.Assert.assertTrue; @RunWith(SpringJUnit4ClassRunner.class) @SpringApplicationConfiguration(classes = SampleHypermediaUiApplication.class) @WebAppConfiguration -@IntegrationTest({ "management.contextPath=", "server.port=0" }) +@IntegrationTest({ "management.context-path=", "server.port=0" }) public class SampleHypermediaUiApplicationTests { @Value("${local.server.port}") diff --git a/spring-boot-samples/spring-boot-sample-hypermedia/src/main/resources/application.properties b/spring-boot-samples/spring-boot-sample-hypermedia/src/main/resources/application.properties index 39f6a14b37..a9198b28f1 100644 --- a/spring-boot-samples/spring-boot-sample-hypermedia/src/main/resources/application.properties +++ b/spring-boot-samples/spring-boot-sample-hypermedia/src/main/resources/application.properties @@ -1,2 +1,2 @@ -# management.contextPath=/admin +# management.context-path=/admin endpoints.docs.curies.enabled=true \ No newline at end of file