diff --git a/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/asciidoc/endpoints/auditevents.adoc b/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/asciidoc/endpoints/auditevents.adoc index 60eb448c9e6..3dea1c724f2 100644 --- a/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/asciidoc/endpoints/auditevents.adoc +++ b/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/asciidoc/endpoints/auditevents.adoc @@ -8,7 +8,7 @@ The `auditevents` endpoint provides information about the application's audit ev [[audit-events-retrieving]] == Retrieving Audit Events -To retrieve the audit events, make a `GET` request to `/application/auditevents`, as shown +To retrieve the audit events, make a `GET` request to `/actuator/auditevents`, as shown in the following curl-based example: include::{snippets}auditevents/filtered/curl-request.adoc[] diff --git a/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/asciidoc/endpoints/beans.adoc b/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/asciidoc/endpoints/beans.adoc index 1371ef5d178..32f8de87f2a 100644 --- a/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/asciidoc/endpoints/beans.adoc +++ b/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/asciidoc/endpoints/beans.adoc @@ -8,7 +8,7 @@ The `beans` endpoint provides information about the application's beans. [[beans-retrieving]] == Retrieving the Beans -To retrieve the beans, make a `GET` request to `/application/beans`, as shown in the +To retrieve the beans, make a `GET` request to `/actuator/beans`, as shown in the following curl-based example: include::{snippets}beans/curl-request.adoc[] diff --git a/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/asciidoc/endpoints/conditions.adoc b/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/asciidoc/endpoints/conditions.adoc index cf492bece35..e705e13a6ac 100644 --- a/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/asciidoc/endpoints/conditions.adoc +++ b/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/asciidoc/endpoints/conditions.adoc @@ -9,7 +9,7 @@ configuration and auto-configuration classes. [[conditions-retrieving]] == Retrieving the Report -To retrieve the report, make a `GET` request to `/application/conditions`, as shown in +To retrieve the report, make a `GET` request to `/actuator/conditions`, as shown in the following curl-based example: include::{snippets}conditions/curl-request.adoc[] diff --git a/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/asciidoc/endpoints/configprops.adoc b/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/asciidoc/endpoints/configprops.adoc index 1b3dac20052..18298203bf4 100644 --- a/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/asciidoc/endpoints/configprops.adoc +++ b/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/asciidoc/endpoints/configprops.adoc @@ -10,7 +10,7 @@ The `configprops` endpoint provides information about the application's == Retrieving the `@ConfigurationProperties` Bean To retrieve the `@ConfigurationProperties` beans, make a `GET` request to -`/application/configprops`, as shown in the following curl-based example: +`/actuator/configprops`, as shown in the following curl-based example: include::{snippets}configprops/curl-request.adoc[] diff --git a/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/asciidoc/endpoints/env.adoc b/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/asciidoc/endpoints/env.adoc index 782588d6a47..8d040b9ef79 100644 --- a/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/asciidoc/endpoints/env.adoc +++ b/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/asciidoc/endpoints/env.adoc @@ -8,7 +8,7 @@ The `env` endpoint provides information about the application's `Environment`. [[env-entire]] == Retrieving the Entire Environment -To retrieve the entire environment, make a `GET` request to `/application/env`, as shown in +To retrieve the entire environment, make a `GET` request to `/actuator/env`, as shown in the following curl-based example: include::{snippets}env/all/curl-request.adoc[] @@ -33,7 +33,7 @@ include::{snippets}env/all/response-fields.adoc[] [[env-single-property]] == Retrieving a Single Property -To retrieve a single property, make a `GET` request to `/application/env/{property.name}`, +To retrieve a single property, make a `GET` request to `/actuator/env/{property.name}`, as shown in the following curl-based example: include::{snippets}env/single/curl-request.adoc[] diff --git a/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/asciidoc/endpoints/flyway.adoc b/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/asciidoc/endpoints/flyway.adoc index 7a8752da8a9..e02cadb3b92 100644 --- a/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/asciidoc/endpoints/flyway.adoc +++ b/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/asciidoc/endpoints/flyway.adoc @@ -8,7 +8,7 @@ The `flyway` endpoint provides information about database migrations performed b [[flyway-retrieving]] == Retrieving the Migrations -To retrieve the migrations, make a `GET` request to `/application/flyway`, as shown in the +To retrieve the migrations, make a `GET` request to `/actuator/flyway`, as shown in the following curl-based example: include::{snippets}flyway/curl-request.adoc[] diff --git a/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/asciidoc/endpoints/health.adoc b/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/asciidoc/endpoints/health.adoc index e03baa12815..16bf2fdcfde 100644 --- a/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/asciidoc/endpoints/health.adoc +++ b/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/asciidoc/endpoints/health.adoc @@ -8,7 +8,7 @@ The `health` endpoint provides detailed information about the health of the appl [[health-retrieving]] == Retrieving the Health -To retrieve the health of the application, make a `GET` request to `/application/health`, +To retrieve the health of the application, make a `GET` request to `/actuator/health`, as shown in the following curl-based example: include::{snippets}health/curl-request.adoc[] diff --git a/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/asciidoc/endpoints/heapdump.adoc b/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/asciidoc/endpoints/heapdump.adoc index f689532017f..0358224f528 100644 --- a/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/asciidoc/endpoints/heapdump.adoc +++ b/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/asciidoc/endpoints/heapdump.adoc @@ -8,7 +8,7 @@ The `heapdump` endpoint provides a heap dump from the application's JVM. [[heapdump-retrieving]] == Retrieving the Heap Dump -To retrieve the heap dump, make a `GET` request to `/application/heapdump`. The response +To retrieve the heap dump, make a `GET` request to `/actuator/heapdump`. The response is binary data in https://docs.oracle.com/javase/8/docs/technotes/samples/hprof.html[ HPROF] format and can be large. Typically, you should save the response to disk for subsequent analysis. When using curl, this can be achieved by using the `-O` option, diff --git a/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/asciidoc/endpoints/info.adoc b/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/asciidoc/endpoints/info.adoc index 0efaba32a04..20379a5591d 100644 --- a/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/asciidoc/endpoints/info.adoc +++ b/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/asciidoc/endpoints/info.adoc @@ -9,7 +9,7 @@ The `info` endpoint provides general information about the application. == Retrieving the Info To retrieve the information about the application, make a `GET` request to -`/application/info`, as shown in the following curl-based example: +`/actuator/info`, as shown in the following curl-based example: include::{snippets}info/curl-request.adoc[] diff --git a/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/asciidoc/endpoints/liquibase.adoc b/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/asciidoc/endpoints/liquibase.adoc index bede34f2952..877b9ccec81 100644 --- a/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/asciidoc/endpoints/liquibase.adoc +++ b/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/asciidoc/endpoints/liquibase.adoc @@ -9,7 +9,7 @@ Liquibase. [[liquibase-retrieving]] == Retrieving the Changes -To retrieve the changes, make a `GET` request to `/application/liquibase`, as shown in the +To retrieve the changes, make a `GET` request to `/actuator/liquibase`, as shown in the following curl-based example: include::{snippets}liquibase/curl-request.adoc[] diff --git a/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/asciidoc/endpoints/logfile.adoc b/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/asciidoc/endpoints/logfile.adoc index ed2d919a6e1..e5579279e2c 100644 --- a/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/asciidoc/endpoints/logfile.adoc +++ b/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/asciidoc/endpoints/logfile.adoc @@ -8,7 +8,7 @@ The `logfile` endpoint provides access to the contents of the application's log [[logfile-retrieving]] == Retrieving the Log File -To retrieve the log file, make a `GET` request to `/application/logfile`, as shown in the +To retrieve the log file, make a `GET` request to `/actuator/logfile`, as shown in the following curl-based example: include::{snippets}logfile/entire/curl-request.adoc[] @@ -24,7 +24,7 @@ include::{snippets}logfile/entire/http-response.adoc[] NOTE: Retrieving part of the log file is not supported when using Jersey. -To retrieve part of the log file, make a `GET` request to `/application/logfile` by using +To retrieve part of the log file, make a `GET` request to `/actuator/logfile` by using the `Range` header, as shown in the following curl-based example: include::{snippets}logfile/range/curl-request.adoc[] diff --git a/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/asciidoc/endpoints/loggers.adoc b/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/asciidoc/endpoints/loggers.adoc index 0179b8dc6cf..ee7671faa22 100644 --- a/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/asciidoc/endpoints/loggers.adoc +++ b/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/asciidoc/endpoints/loggers.adoc @@ -9,7 +9,7 @@ of their levels. [[loggers-all]] == Retrieving All Loggers -To retrieve the application's loggers, make a `GET` request to `/application/loggers`, as +To retrieve the application's loggers, make a `GET` request to `/actuator/loggers`, as shown in the following curl-based example: include::{snippets}loggers/all/curl-request.adoc[] @@ -34,7 +34,7 @@ include::{snippets}loggers/all/response-fields.adoc[] [[loggers-single]] == Retrieving a Single Logger -To retrieve a single logger, make a `GET` request to `/application/loggers/{logger.name}`, +To retrieve a single logger, make a `GET` request to `/actuator/loggers/{logger.name}`, as shown in the following curl-based example: include::{snippets}loggers/single/curl-request.adoc[] @@ -61,7 +61,7 @@ include::{snippets}loggers/single/response-fields.adoc[] == Setting a Log Level To set the level of a logger, make a `POST` request to -`/application/loggers/{logger.name}` with a JSON body that specifies the configured level +`/actuator/loggers/{logger.name}` with a JSON body that specifies the configured level for the logger, as shown in the following curl-based example: include::{snippets}loggers/set/curl-request.adoc[] @@ -85,7 +85,7 @@ include::{snippets}loggers/set/request-fields.adoc[] == Clearing a Log Level To clear the level of a logger, make a `POST` request to -`/application/loggers/{logger.name}` with a JSON body containing an empty object, as shown +`/actuator/loggers/{logger.name}` with a JSON body containing an empty object, as shown in the following curl-based example: include::{snippets}loggers/clear/curl-request.adoc[] diff --git a/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/asciidoc/endpoints/metrics.adoc b/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/asciidoc/endpoints/metrics.adoc index f6a5f248546..95adb3f8b1b 100644 --- a/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/asciidoc/endpoints/metrics.adoc +++ b/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/asciidoc/endpoints/metrics.adoc @@ -9,7 +9,7 @@ The `metrics` endpoint provides access to application metrics. == Retrieving Metric Names To retrieve the names of the available metrics, make a `GET` request to -`/application/metrics`, as shown in the following curl-based example: +`/actuator/metrics`, as shown in the following curl-based example: include::{snippets}metrics/names/curl-request.adoc[] @@ -33,7 +33,7 @@ include::{snippets}metrics/names/response-fields.adoc[] [[metrics-retrieving-metric]] == Retrieving a Metric -To retrieve a metric, make a `GET` request to `/application/metrics/{metric.name}`, as +To retrieve a metric, make a `GET` request to `/actuator/metrics/{metric.name}`, as shown in the following curl-based example: include::{snippets}metrics/metric/curl-request.adoc[] @@ -68,7 +68,7 @@ include::{snippets}metrics/metric/response-fields.adoc[] [[metrics-drilling-down]] == Drilling Down -To drill down into a metric, make a `GET` request to `/application/metrics/{metric.name}` +To drill down into a metric, make a `GET` request to `/actuator/metrics/{metric.name}` using the `tag` query parameter, as shown in the following curl-based example: include::{snippets}metrics/metric-with-tags/curl-request.adoc[] diff --git a/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/asciidoc/endpoints/prometheus.adoc b/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/asciidoc/endpoints/prometheus.adoc index 65bbdf17dc3..1212106532e 100644 --- a/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/asciidoc/endpoints/prometheus.adoc +++ b/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/asciidoc/endpoints/prometheus.adoc @@ -9,7 +9,7 @@ required for scraping by a Prometheus server. [[prometheus-retrieving]] == Retrieving the Metrics -To retrieve the metrics, make a `GET` request to `/application/prometheus`, as shown in +To retrieve the metrics, make a `GET` request to `/actuator/prometheus`, as shown in the following curl-based example: include::{snippets}prometheus/curl-request.adoc[] diff --git a/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/asciidoc/endpoints/scheduledtasks.adoc b/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/asciidoc/endpoints/scheduledtasks.adoc index 2b38868023d..2a921caddcf 100644 --- a/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/asciidoc/endpoints/scheduledtasks.adoc +++ b/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/asciidoc/endpoints/scheduledtasks.adoc @@ -9,7 +9,7 @@ tasks. [[scheduled-tasks-retrieving]] == Retrieving the Scheduled Tasks -To retrieve the scheduled tasks, make a `GET` request to `/application/scheduledtasks`, +To retrieve the scheduled tasks, make a `GET` request to `/actuator/scheduledtasks`, as shown in the following curl-based example: include::{snippets}scheduled-tasks/curl-request.adoc[] diff --git a/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/asciidoc/endpoints/sessions.adoc b/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/asciidoc/endpoints/sessions.adoc index 8a0a4b5015d..46bb50df441 100644 --- a/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/asciidoc/endpoints/sessions.adoc +++ b/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/asciidoc/endpoints/sessions.adoc @@ -9,7 +9,7 @@ are managed by Spring Session. [[sessions-retrieving]] == Retrieving Sessions -To retrieve the sessions, make a `GET` request to `/application/sessions`, as shown in the +To retrieve the sessions, make a `GET` request to `/actuator/sessions`, as shown in the following curl-based example: include::{snippets}sessions/username/curl-request.adoc[] @@ -48,7 +48,7 @@ include::{snippets}sessions/username/response-fields.adoc[] [[sessions-retrieving-id]] == Retrieving a Single Session -To retrieve a single session, make a `GET` request to `/application/sessions/{id}`, as +To retrieve a single session, make a `GET` request to `/actuator/sessions/{id}`, as shown in the following curl-based example: include::{snippets}sessions/id/curl-request.adoc[] @@ -75,7 +75,7 @@ include::{snippets}sessions/id/response-fields.adoc[] [[sessions-deleting]] == Deleting a Session -To delete a session, make a `DELETE` request to `/application/sessions/{id}`, as shown in +To delete a session, make a `DELETE` request to `/actuator/sessions/{id}`, as shown in the following curl-based example: include::{snippets}sessions/delete/curl-request.adoc[] diff --git a/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/asciidoc/endpoints/shutdown.adoc b/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/asciidoc/endpoints/shutdown.adoc index fedc33dd2fd..6aca843eb49 100644 --- a/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/asciidoc/endpoints/shutdown.adoc +++ b/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/asciidoc/endpoints/shutdown.adoc @@ -8,7 +8,7 @@ The `shutdown` endpoint is used to shut down the application. [[shutdown-shutting-down]] == Shutting Down the Application -To shut down the application, make a `POST` request to `/application/shutdown`, as shown +To shut down the application, make a `POST` request to `/actuator/shutdown`, as shown in the following curl-based example: include::{snippets}shutdown/curl-request.adoc[] diff --git a/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/asciidoc/endpoints/threaddump.adoc b/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/asciidoc/endpoints/threaddump.adoc index 7f72308aaad..997d3f36ec5 100644 --- a/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/asciidoc/endpoints/threaddump.adoc +++ b/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/asciidoc/endpoints/threaddump.adoc @@ -8,7 +8,7 @@ The `threaddump` endpoint provides a thread dump from the application's JVM. [[threaddump-retrieving]] == Retrieving the Thread Dump -To retrieve the thread dump, make a `GET` request to `/application/threaddump`, as shown +To retrieve the thread dump, make a `GET` request to `/actuator/threaddump`, as shown in the following curl-based example: include::{snippets}threaddump/curl-request.adoc[] diff --git a/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/asciidoc/index.adoc b/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/asciidoc/index.adoc index 87205a3cffc..14af3216ef0 100644 --- a/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/asciidoc/index.adoc +++ b/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/asciidoc/index.adoc @@ -25,8 +25,8 @@ Before you proceed, you should read the following topics: [[overview-endpoint-urls]] === URLs -By default, all web endpoints are available beneath the path `/application` with URLs of -the form `/application/{id}`. The `/application` base path can be configured by using the +By default, all web endpoints are available beneath the path `/actuator` with URLs of +the form `/actuator/{id}`. The `/actuator` base path can be configured by using the `management.endpoints.web.base-path` property, as shown in the following example: [source,properties,indent=0] @@ -35,7 +35,7 @@ the form `/application/{id}`. The `/application` base path can be configured by ---- The preceding `application.properties` example changes the form of the endpoint URLs from -`/application/{id}` to `/manage/{id}`. For example, the URL `info` endpoint would become +`/actuator/{id}` to `/manage/{id}`. For example, the URL `info` endpoint would become `/manage/info`. diff --git a/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/endpoint/web/WebEndpointProperties.java b/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/endpoint/web/WebEndpointProperties.java index 8778d51a129..24c85b1b0e7 100644 --- a/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/endpoint/web/WebEndpointProperties.java +++ b/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/endpoint/web/WebEndpointProperties.java @@ -38,7 +38,7 @@ public class WebEndpointProperties { * Base path for Web endpoints. Relative to server.context-path or * management.server.context-path if management.server.port is configured. */ - private String basePath = "/application"; + private String basePath = "/actuator"; /** * Endpoint IDs that should be exposed or '*' for all. diff --git a/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/endpoint/web/DefaultEndpointPathProviderTests.java b/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/endpoint/web/DefaultEndpointPathProviderTests.java index 881af3bfa02..91492ca409b 100644 --- a/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/endpoint/web/DefaultEndpointPathProviderTests.java +++ b/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/endpoint/web/DefaultEndpointPathProviderTests.java @@ -56,9 +56,8 @@ public class DefaultEndpointPathProviderTests { @Test public void getPathsWhenHasContextPathShouldReturnAllPathsWithContext() throws Exception { - DefaultEndpointPathProvider provider = createProvider("/application"); - assertThat(provider.getPaths()).containsOnly("/application/foo", - "/application/bar"); + DefaultEndpointPathProvider provider = createProvider("/actuator"); + assertThat(provider.getPaths()).containsOnly("/actuator/foo", "/actuator/bar"); } @Test @@ -75,8 +74,8 @@ public class DefaultEndpointPathProviderTests { @Test public void getPathWhenHasContextPathReturnPath() throws Exception { - DefaultEndpointPathProvider provider = createProvider("/application"); - assertThat(provider.getPath("foo")).isEqualTo("/application/foo"); + DefaultEndpointPathProvider provider = createProvider("/actuator"); + assertThat(provider.getPath("foo")).isEqualTo("/actuator/foo"); } private DefaultEndpointPathProvider createProvider(String contextPath) { diff --git a/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/endpoint/web/WebEndpointPropertiesTests.java b/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/endpoint/web/WebEndpointPropertiesTests.java index f17f62295d8..c4593b66ee1 100644 --- a/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/endpoint/web/WebEndpointPropertiesTests.java +++ b/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/endpoint/web/WebEndpointPropertiesTests.java @@ -30,7 +30,7 @@ public class WebEndpointPropertiesTests { @Test public void defaultBasePathShouldBeApplication() throws Exception { WebEndpointProperties properties = new WebEndpointProperties(); - assertThat(properties.getBasePath()).isEqualTo("/application"); + assertThat(properties.getBasePath()).isEqualTo("/actuator"); } @Test diff --git a/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/endpoint/web/documentation/AuditEventsEndpointDocumentationTests.java b/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/endpoint/web/documentation/AuditEventsEndpointDocumentationTests.java index e969eef7575..4e753f7e3d1 100644 --- a/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/endpoint/web/documentation/AuditEventsEndpointDocumentationTests.java +++ b/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/endpoint/web/documentation/AuditEventsEndpointDocumentationTests.java @@ -60,8 +60,7 @@ public class AuditEventsEndpointDocumentationTests String queryTimestamp = "2017-11-07T09:37Z"; given(this.repository.find(any(), any(), any())).willReturn( Arrays.asList(new AuditEvent("alice", "logout", Collections.emptyMap()))); - this.mockMvc - .perform(get("/application/auditevents").param("after", queryTimestamp)) + this.mockMvc.perform(get("/actuator/auditevents").param("after", queryTimestamp)) .andExpect(status().isOk()) .andDo(document("auditevents/after", responseFields( fieldWithPath("events").description("An array of audit events."), @@ -81,7 +80,7 @@ public class AuditEventsEndpointDocumentationTests given(this.repository.find("alice", date, "logout")).willReturn( Arrays.asList(new AuditEvent("alice", "logout", Collections.emptyMap()))); this.mockMvc - .perform(get("/application/auditevents").param("principal", "alice") + .perform(get("/actuator/auditevents").param("principal", "alice") .param("after", queryTimestamp).param("type", "logout")) .andExpect(status().isOk()) .andDo(document("auditevents/filtered", diff --git a/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/endpoint/web/documentation/BeansEndpointDocumentationTests.java b/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/endpoint/web/documentation/BeansEndpointDocumentationTests.java index ebad7a98111..536d69569e1 100644 --- a/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/endpoint/web/documentation/BeansEndpointDocumentationTests.java +++ b/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/endpoint/web/documentation/BeansEndpointDocumentationTests.java @@ -69,7 +69,7 @@ public class BeansEndpointDocumentationTests extends AbstractEndpointDocumentati .description("Beans in the parent application " + "context, if any.") .type(JsonFieldType.OBJECT).optional()); - this.mockMvc.perform(get("/application/beans")).andExpect(status().isOk()) + this.mockMvc.perform(get("/actuator/beans")).andExpect(status().isOk()) .andDo(document("beans", preprocessResponse(limit("beans", this::isIndependentBean)), responseFields)); diff --git a/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/endpoint/web/documentation/ConditionsReportEndpointDocumentationTests.java b/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/endpoint/web/documentation/ConditionsReportEndpointDocumentationTests.java index 38159bc38e6..28f343c52cc 100644 --- a/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/endpoint/web/documentation/ConditionsReportEndpointDocumentationTests.java +++ b/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/endpoint/web/documentation/ConditionsReportEndpointDocumentationTests.java @@ -70,7 +70,7 @@ public class ConditionsReportEndpointDocumentationTests @Test public void conditions() throws Exception { - this.mockMvc.perform(get("/application/conditions")).andExpect(status().isOk()) + this.mockMvc.perform(get("/actuator/conditions")).andExpect(status().isOk()) .andDo(MockMvcRestDocumentation.document("conditions", preprocessResponse(limit("positiveMatches"), limit("negativeMatches")), diff --git a/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/endpoint/web/documentation/ConfigurationPropertiesReportEndpointDocumentationTests.java b/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/endpoint/web/documentation/ConfigurationPropertiesReportEndpointDocumentationTests.java index f71cf51cdca..8b5e350c4d9 100644 --- a/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/endpoint/web/documentation/ConfigurationPropertiesReportEndpointDocumentationTests.java +++ b/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/endpoint/web/documentation/ConfigurationPropertiesReportEndpointDocumentationTests.java @@ -43,7 +43,7 @@ public class ConfigurationPropertiesReportEndpointDocumentationTests @Test public void configProps() throws Exception { - this.mockMvc.perform(get("/application/configprops")).andExpect(status().isOk()) + this.mockMvc.perform(get("/actuator/configprops")).andExpect(status().isOk()) .andDo(MockMvcRestDocumentation.document("configprops", preprocessResponse(limit("beans")), responseFields( diff --git a/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/endpoint/web/documentation/EnvironmentEndpointDocumentationTests.java b/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/endpoint/web/documentation/EnvironmentEndpointDocumentationTests.java index 37a7e4b296e..531895e7330 100644 --- a/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/endpoint/web/documentation/EnvironmentEndpointDocumentationTests.java +++ b/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/endpoint/web/documentation/EnvironmentEndpointDocumentationTests.java @@ -71,7 +71,7 @@ public class EnvironmentEndpointDocumentationTests @Test public void env() throws Exception { - this.mockMvc.perform(get("/application/env")).andExpect(status().isOk()) + this.mockMvc.perform(get("/actuator/env")).andExpect(status().isOk()) .andDo(document("env/all", preprocessResponse(replacePattern( Pattern.compile( @@ -91,7 +91,7 @@ public class EnvironmentEndpointDocumentationTests @Test public void singlePropertyFromEnv() throws Exception { - this.mockMvc.perform(get("/application/env/com.example.cache.max-size")) + this.mockMvc.perform(get("/actuator/env/com.example.cache.max-size")) .andExpect(status().isOk()) .andDo(document("env/single", preprocessResponse(replacePattern( diff --git a/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/endpoint/web/documentation/FlywayEndpointDocumentationTests.java b/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/endpoint/web/documentation/FlywayEndpointDocumentationTests.java index d4ca7d25d67..e283c12a203 100644 --- a/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/endpoint/web/documentation/FlywayEndpointDocumentationTests.java +++ b/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/endpoint/web/documentation/FlywayEndpointDocumentationTests.java @@ -50,7 +50,7 @@ public class FlywayEndpointDocumentationTests extends AbstractEndpointDocumentat @Test public void flyway() throws Exception { - this.mockMvc.perform(get("/application/flyway")).andExpect(status().isOk()) + this.mockMvc.perform(get("/actuator/flyway")).andExpect(status().isOk()) .andDo(MockMvcRestDocumentation.document("flyway", responseFields(fieldWithPath("*.migrations").description( "Migrations performed by the Flyway instance, keyed by" diff --git a/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/endpoint/web/documentation/HealthEndpointDocumentationTests.java b/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/endpoint/web/documentation/HealthEndpointDocumentationTests.java index 044e95b564b..ad7e9c90dad 100644 --- a/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/endpoint/web/documentation/HealthEndpointDocumentationTests.java +++ b/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/endpoint/web/documentation/HealthEndpointDocumentationTests.java @@ -51,7 +51,7 @@ public class HealthEndpointDocumentationTests extends AbstractEndpointDocumentat @Test public void health() throws Exception { - this.mockMvc.perform(get("/application/health")).andExpect(status().isOk()) + this.mockMvc.perform(get("/actuator/health")).andExpect(status().isOk()) .andDo(document("health", responseFields( fieldWithPath("status").description( diff --git a/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/endpoint/web/documentation/HeapDumpWebEndpointDocumentationTests.java b/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/endpoint/web/documentation/HeapDumpWebEndpointDocumentationTests.java index 7f4fe292cae..2e0f7e22225 100644 --- a/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/endpoint/web/documentation/HeapDumpWebEndpointDocumentationTests.java +++ b/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/endpoint/web/documentation/HeapDumpWebEndpointDocumentationTests.java @@ -44,7 +44,7 @@ public class HeapDumpWebEndpointDocumentationTests @Test public void heapDump() throws Exception { - this.mockMvc.perform(get("/application/heapdump")).andExpect(status().isOk()) + this.mockMvc.perform(get("/actuator/heapdump")).andExpect(status().isOk()) .andDo(document("heapdump", new CurlRequestSnippet(CliDocumentation.multiLineFormat()) { diff --git a/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/endpoint/web/documentation/InfoEndpointDocumentationTests.java b/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/endpoint/web/documentation/InfoEndpointDocumentationTests.java index 5429a0236df..9342bc11639 100644 --- a/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/endpoint/web/documentation/InfoEndpointDocumentationTests.java +++ b/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/endpoint/web/documentation/InfoEndpointDocumentationTests.java @@ -48,7 +48,7 @@ public class InfoEndpointDocumentationTests extends AbstractEndpointDocumentatio @Test public void info() throws Exception { - this.mockMvc.perform(get("/application/info")).andExpect(status().isOk()) + this.mockMvc.perform(get("/actuator/info")).andExpect(status().isOk()) .andDo(MockMvcRestDocumentation.document("info", responseFields(beneathPath("git"), fieldWithPath("branch") diff --git a/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/endpoint/web/documentation/LiquibaseEndpointDocumentationTests.java b/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/endpoint/web/documentation/LiquibaseEndpointDocumentationTests.java index a609643433f..5001865d030 100644 --- a/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/endpoint/web/documentation/LiquibaseEndpointDocumentationTests.java +++ b/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/endpoint/web/documentation/LiquibaseEndpointDocumentationTests.java @@ -48,7 +48,7 @@ public class LiquibaseEndpointDocumentationTests @Test public void liquibase() throws Exception { - this.mockMvc.perform(get("/application/liquibase")).andExpect(status().isOk()) + this.mockMvc.perform(get("/actuator/liquibase")).andExpect(status().isOk()) .andDo(MockMvcRestDocumentation.document("liquibase", responseFields(fieldWithPath("*.changeSets").description( "Change sets made by the Liquibase beans, keyed by " diff --git a/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/endpoint/web/documentation/LogFileWebEndpointDocumentationTests.java b/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/endpoint/web/documentation/LogFileWebEndpointDocumentationTests.java index 91a89bca4a2..8b8d263a914 100644 --- a/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/endpoint/web/documentation/LogFileWebEndpointDocumentationTests.java +++ b/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/endpoint/web/documentation/LogFileWebEndpointDocumentationTests.java @@ -40,13 +40,13 @@ public class LogFileWebEndpointDocumentationTests @Test public void logFile() throws Exception { - this.mockMvc.perform(get("/application/logfile")).andExpect(status().isOk()) + this.mockMvc.perform(get("/actuator/logfile")).andExpect(status().isOk()) .andDo(MockMvcRestDocumentation.document("logfile/entire")); } @Test public void logFileRange() throws Exception { - this.mockMvc.perform(get("/application/logfile").header("Range", "bytes=0-1023")) + this.mockMvc.perform(get("/actuator/logfile").header("Range", "bytes=0-1023")) .andExpect(status().isPartialContent()) .andDo(MockMvcRestDocumentation.document("logfile/range")); } diff --git a/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/endpoint/web/documentation/LoggersEndpointDocumentationTests.java b/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/endpoint/web/documentation/LoggersEndpointDocumentationTests.java index c3705190ac4..441ca4b978a 100644 --- a/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/endpoint/web/documentation/LoggersEndpointDocumentationTests.java +++ b/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/endpoint/web/documentation/LoggersEndpointDocumentationTests.java @@ -67,7 +67,7 @@ public class LoggersEndpointDocumentationTests given(this.loggingSystem.getLoggerConfigurations()).willReturn(Arrays.asList( new LoggerConfiguration("ROOT", LogLevel.INFO, LogLevel.INFO), new LoggerConfiguration("com.example", LogLevel.DEBUG, LogLevel.DEBUG))); - this.mockMvc.perform(get("/application/loggers")).andExpect(status().isOk()) + this.mockMvc.perform(get("/actuator/loggers")).andExpect(status().isOk()) .andDo(MockMvcRestDocumentation.document("loggers/all", responseFields( fieldWithPath("levels").description( @@ -80,7 +80,7 @@ public class LoggersEndpointDocumentationTests public void logger() throws Exception { given(this.loggingSystem.getLoggerConfiguration("com.example")).willReturn( new LoggerConfiguration("com.example", LogLevel.INFO, LogLevel.INFO)); - this.mockMvc.perform(get("/application/loggers/com.example")) + this.mockMvc.perform(get("/actuator/loggers/com.example")) .andExpect(status().isOk()).andDo(MockMvcRestDocumentation .document("loggers/single", responseFields(levelFields))); } @@ -88,7 +88,7 @@ public class LoggersEndpointDocumentationTests @Test public void setLogLevel() throws Exception { this.mockMvc - .perform(post("/application/loggers/com.example") + .perform(post("/actuator/loggers/com.example") .content("{\"configuredLevel\":\"debug\"}") .contentType(MediaType.APPLICATION_JSON)) .andExpect(status().isNoContent()) @@ -104,7 +104,7 @@ public class LoggersEndpointDocumentationTests @Test public void clearLogLevel() throws Exception { this.mockMvc - .perform(post("/application/loggers/com.example").content("{}") + .perform(post("/actuator/loggers/com.example").content("{}") .contentType(MediaType.APPLICATION_JSON)) .andExpect(status().isNoContent()) .andDo(MockMvcRestDocumentation.document("loggers/clear")); diff --git a/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/endpoint/web/documentation/MetricsEndpointDocumentationTests.java b/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/endpoint/web/documentation/MetricsEndpointDocumentationTests.java index 1831d4fa752..0a2c96fc4b7 100644 --- a/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/endpoint/web/documentation/MetricsEndpointDocumentationTests.java +++ b/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/endpoint/web/documentation/MetricsEndpointDocumentationTests.java @@ -44,14 +44,14 @@ public class MetricsEndpointDocumentationTests @Test public void metricNames() throws Exception { - this.mockMvc.perform(get("/application/metrics")).andExpect(status().isOk()) + this.mockMvc.perform(get("/actuator/metrics")).andExpect(status().isOk()) .andDo(document("metrics/names", responseFields(fieldWithPath("names") .description("Names of the known metrics.")))); } @Test public void metric() throws Exception { - this.mockMvc.perform(get("/application/metrics/jvm.memory.max")) + this.mockMvc.perform(get("/actuator/metrics/jvm.memory.max")) .andExpect(status().isOk()) .andDo(document("metrics/metric", responseFields( @@ -74,7 +74,7 @@ public class MetricsEndpointDocumentationTests @Test public void metricWithTags() throws Exception { this.mockMvc - .perform(get("/application/metrics/jvm.memory.max") + .perform(get("/actuator/metrics/jvm.memory.max") .param("tag", "area:nonheap") .param("tag", "id:Compressed Class Space")) .andExpect(status().isOk()) diff --git a/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/endpoint/web/documentation/PrometheusScrapeEndpointDocumentationTests.java b/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/endpoint/web/documentation/PrometheusScrapeEndpointDocumentationTests.java index c39dabf585c..ef5d921aff2 100644 --- a/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/endpoint/web/documentation/PrometheusScrapeEndpointDocumentationTests.java +++ b/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/endpoint/web/documentation/PrometheusScrapeEndpointDocumentationTests.java @@ -42,7 +42,7 @@ public class PrometheusScrapeEndpointDocumentationTests @Test public void prometheus() throws Exception { - this.mockMvc.perform(get("/application/prometheus")).andExpect(status().isOk()) + this.mockMvc.perform(get("/actuator/prometheus")).andExpect(status().isOk()) .andDo(document("prometheus")); } diff --git a/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/endpoint/web/documentation/ScheduledTasksEndpointDocumentationTests.java b/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/endpoint/web/documentation/ScheduledTasksEndpointDocumentationTests.java index 337441b7695..825abe54280 100644 --- a/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/endpoint/web/documentation/ScheduledTasksEndpointDocumentationTests.java +++ b/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/endpoint/web/documentation/ScheduledTasksEndpointDocumentationTests.java @@ -48,8 +48,7 @@ public class ScheduledTasksEndpointDocumentationTests @Test public void scheduledTasks() throws Exception { - this.mockMvc.perform(get("/application/scheduledtasks")) - .andExpect(status().isOk()) + this.mockMvc.perform(get("/actuator/scheduledtasks")).andExpect(status().isOk()) .andDo(document("scheduled-tasks", preprocessResponse(replacePattern( Pattern.compile( diff --git a/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/endpoint/web/documentation/SessionsEndpointDocumentationTests.java b/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/endpoint/web/documentation/SessionsEndpointDocumentationTests.java index 2276c59952c..d9976084c43 100644 --- a/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/endpoint/web/documentation/SessionsEndpointDocumentationTests.java +++ b/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/endpoint/web/documentation/SessionsEndpointDocumentationTests.java @@ -92,7 +92,7 @@ public class SessionsEndpointDocumentationTests given(this.sessionRepository.findByIndexNameAndIndexValue( FindByIndexNameSessionRepository.PRINCIPAL_NAME_INDEX_NAME, "alice")) .willReturn(sessions); - this.mockMvc.perform(get("/application/sessions").param("username", "alice")) + this.mockMvc.perform(get("/actuator/sessions").param("username", "alice")) .andExpect(status().isOk()) .andDo(document("sessions/username", responseFields(fieldWithPath("sessions") @@ -109,14 +109,14 @@ public class SessionsEndpointDocumentationTests sessions.put(sessionTwo.getId(), sessionTwo); sessions.put(sessionThree.getId(), sessionThree); given(this.sessionRepository.findById(sessionTwo.getId())).willReturn(sessionTwo); - this.mockMvc.perform(get("/application/sessions/{id}", sessionTwo.getId())) + this.mockMvc.perform(get("/actuator/sessions/{id}", sessionTwo.getId())) .andExpect(status().isOk()) .andDo(document("sessions/id", responseFields(sessionFields))); } @Test public void deleteASession() throws Exception { - this.mockMvc.perform(delete("/application/sessions/{id}", sessionTwo.getId())) + this.mockMvc.perform(delete("/actuator/sessions/{id}", sessionTwo.getId())) .andExpect(status().isNoContent()).andDo(document("sessions/delete")); verify(this.sessionRepository).deleteById(sessionTwo.getId()); } diff --git a/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/endpoint/web/documentation/ShutdownEndpointDocumentationTests.java b/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/endpoint/web/documentation/ShutdownEndpointDocumentationTests.java index c17ab808282..bea1dbe0fe1 100644 --- a/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/endpoint/web/documentation/ShutdownEndpointDocumentationTests.java +++ b/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/endpoint/web/documentation/ShutdownEndpointDocumentationTests.java @@ -43,7 +43,7 @@ public class ShutdownEndpointDocumentationTests @Test public void shutdown() throws Exception { - this.mockMvc.perform(post("/application/shutdown")).andExpect(status().isOk()) + this.mockMvc.perform(post("/actuator/shutdown")).andExpect(status().isOk()) .andDo(MockMvcRestDocumentation.document("shutdown", responseFields(fieldWithPath("message").description( "Message describing the result of the request.")))); diff --git a/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/endpoint/web/documentation/ThreadDumpEndpointDocumentationTests.java b/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/endpoint/web/documentation/ThreadDumpEndpointDocumentationTests.java index f59c4887264..1e2be9d71c9 100644 --- a/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/endpoint/web/documentation/ThreadDumpEndpointDocumentationTests.java +++ b/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/endpoint/web/documentation/ThreadDumpEndpointDocumentationTests.java @@ -42,7 +42,7 @@ public class ThreadDumpEndpointDocumentationTests @Test public void threadDump() throws Exception { - this.mockMvc.perform(get("/application/threaddump")).andExpect(status().isOk()) + this.mockMvc.perform(get("/actuator/threaddump")).andExpect(status().isOk()) .andDo(MockMvcRestDocumentation.document("threaddump", preprocessResponse(limit("threads")), responseFields( diff --git a/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/integrationtest/JolokiaManagementContextConfigurationIntegrationTests.java b/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/integrationtest/JolokiaManagementContextConfigurationIntegrationTests.java index fd7710dc9e3..c9b1d1b68ad 100644 --- a/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/integrationtest/JolokiaManagementContextConfigurationIntegrationTests.java +++ b/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/integrationtest/JolokiaManagementContextConfigurationIntegrationTests.java @@ -70,7 +70,7 @@ public class JolokiaManagementContextConfigurationIntegrationTests { @Test public void jolokiaIsExposed() { ResponseEntity response = this.restTemplate - .getForEntity("/application/jolokia", String.class); + .getForEntity("/actuator/jolokia", String.class); assertThat(HttpStatus.OK).isEqualTo(response.getStatusCode()); assertThat(response.getBody()).contains("\"agent\""); assertThat(response.getBody()).contains("\"request\":{\"type\""); @@ -79,7 +79,7 @@ public class JolokiaManagementContextConfigurationIntegrationTests { @Test public void search() { ResponseEntity response = this.restTemplate - .getForEntity("/application/jolokia/search/java.lang:*", String.class); + .getForEntity("/actuator/jolokia/search/java.lang:*", String.class); assertThat(HttpStatus.OK).isEqualTo(response.getStatusCode()); assertThat(response.getBody()).contains("GarbageCollector"); } @@ -87,7 +87,7 @@ public class JolokiaManagementContextConfigurationIntegrationTests { @Test public void read() { ResponseEntity response = this.restTemplate.getForEntity( - "/application/jolokia/read/java.lang:type=Memory", String.class); + "/actuator/jolokia/read/java.lang:type=Memory", String.class); assertThat(HttpStatus.OK).isEqualTo(response.getStatusCode()); assertThat(response.getBody()).contains("NonHeapMemoryUsage"); } @@ -95,7 +95,7 @@ public class JolokiaManagementContextConfigurationIntegrationTests { @Test public void list() { ResponseEntity response = this.restTemplate.getForEntity( - "/application/jolokia/list/java.lang/type=Memory/attr", String.class); + "/actuator/jolokia/list/java.lang/type=Memory/attr", String.class); assertThat(HttpStatus.OK).isEqualTo(response.getStatusCode()); assertThat(response.getBody()).contains("NonHeapMemoryUsage"); } diff --git a/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/integrationtest/WebMvcEndpointCorsIntegrationTests.java b/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/integrationtest/WebMvcEndpointCorsIntegrationTests.java index bd4e150a62e..6cd895944e1 100644 --- a/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/integrationtest/WebMvcEndpointCorsIntegrationTests.java +++ b/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/integrationtest/WebMvcEndpointCorsIntegrationTests.java @@ -78,7 +78,7 @@ public class WebMvcEndpointCorsIntegrationTests { MockMvc mockMvc = createMockMvc(); System.out.println(new ConditionEvaluationReportMessage( this.context.getBean(ConditionEvaluationReport.class))); - mockMvc.perform(options("/application/beans").header("Origin", "foo.example.com") + mockMvc.perform(options("/actuator/beans").header("Origin", "foo.example.com") .header(HttpHeaders.ACCESS_CONTROL_REQUEST_METHOD, "GET")).andExpect( header().doesNotExist(HttpHeaders.ACCESS_CONTROL_ALLOW_ORIGIN)); } @@ -89,7 +89,7 @@ public class WebMvcEndpointCorsIntegrationTests { .of("management.endpoints.web.cors.allowed-origins:foo.example.com") .applyTo(this.context); createMockMvc() - .perform(options("/application/beans").header("Origin", "bar.example.com") + .perform(options("/actuator/beans").header("Origin", "bar.example.com") .header(HttpHeaders.ACCESS_CONTROL_REQUEST_METHOD, "GET")) .andExpect(status().isForbidden()); performAcceptedCorsRequest(); @@ -120,7 +120,7 @@ public class WebMvcEndpointCorsIntegrationTests { .of("management.endpoints.web.cors.allowed-origins:foo.example.com") .applyTo(this.context); createMockMvc() - .perform(options("/application/beans").header("Origin", "foo.example.com") + .perform(options("/actuator/beans").header("Origin", "foo.example.com") .header(HttpHeaders.ACCESS_CONTROL_REQUEST_METHOD, "GET") .header(HttpHeaders.ACCESS_CONTROL_REQUEST_HEADERS, "Alpha")) .andExpect(status().isForbidden()); @@ -133,7 +133,7 @@ public class WebMvcEndpointCorsIntegrationTests { "management.endpoints.web.cors.allowed-headers:Alpha,Bravo") .applyTo(this.context); createMockMvc() - .perform(options("/application/beans").header("Origin", "foo.example.com") + .perform(options("/actuator/beans").header("Origin", "foo.example.com") .header(HttpHeaders.ACCESS_CONTROL_REQUEST_METHOD, "GET") .header(HttpHeaders.ACCESS_CONTROL_REQUEST_HEADERS, "Alpha")) .andExpect(status().isOk()).andExpect(header() @@ -146,7 +146,7 @@ public class WebMvcEndpointCorsIntegrationTests { .of("management.endpoints.web.cors.allowed-origins:foo.example.com") .applyTo(this.context); createMockMvc() - .perform(options("/application/health") + .perform(options("/actuator/health") .header(HttpHeaders.ORIGIN, "foo.example.com") .header(HttpHeaders.ACCESS_CONTROL_REQUEST_METHOD, "PATCH")) .andExpect(status().isForbidden()); @@ -159,7 +159,7 @@ public class WebMvcEndpointCorsIntegrationTests { "management.endpoints.web.cors.allowed-methods:GET,HEAD") .applyTo(this.context); createMockMvc() - .perform(options("/application/beans") + .perform(options("/actuator/beans") .header(HttpHeaders.ORIGIN, "foo.example.com") .header(HttpHeaders.ACCESS_CONTROL_REQUEST_METHOD, "HEAD")) .andExpect(status().isOk()).andExpect(header() @@ -192,7 +192,7 @@ public class WebMvcEndpointCorsIntegrationTests { } private ResultActions performAcceptedCorsRequest() throws Exception { - return performAcceptedCorsRequest("/application/beans"); + return performAcceptedCorsRequest("/actuator/beans"); } private ResultActions performAcceptedCorsRequest(String url) throws Exception { diff --git a/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/integrationtest/WebMvcEndpointExposureIntegrationTests.java b/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/integrationtest/WebMvcEndpointExposureIntegrationTests.java index d9d2cc403b9..e0b839828fa 100644 --- a/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/integrationtest/WebMvcEndpointExposureIntegrationTests.java +++ b/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/integrationtest/WebMvcEndpointExposureIntegrationTests.java @@ -138,7 +138,7 @@ public class WebMvcEndpointExposureIntegrationTests { private boolean isExposed(MockMvc mockMvc, HttpMethod method, String path) throws Exception { - path = "/application/" + path; + path = "/actuator/" + path; MvcResult mvcResult = mockMvc.perform(request(method, path)).andReturn(); int status = mvcResult.getResponse().getStatus(); if (status == HttpStatus.OK.value()) { diff --git a/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/integrationtest/WebMvcEndpointIntegrationTests.java b/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/integrationtest/WebMvcEndpointIntegrationTests.java index e0cbcefb774..f7cf9be6747 100644 --- a/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/integrationtest/WebMvcEndpointIntegrationTests.java +++ b/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/integrationtest/WebMvcEndpointIntegrationTests.java @@ -70,7 +70,7 @@ public class WebMvcEndpointIntegrationTests { this.context = new AnnotationConfigWebApplicationContext(); this.context.register(SecureConfiguration.class); MockMvc mockMvc = createSecureMockMvc(); - mockMvc.perform(get("/application/beans").accept(MediaType.APPLICATION_JSON)) + mockMvc.perform(get("/actuator/beans").accept(MediaType.APPLICATION_JSON)) .andExpect(status().isUnauthorized()); } diff --git a/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/jolokia/JolokiaManagementContextConfigurationTests.java b/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/jolokia/JolokiaManagementContextConfigurationTests.java index 4e5cdf4092e..1ab4d9b37b3 100644 --- a/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/jolokia/JolokiaManagementContextConfigurationTests.java +++ b/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/jolokia/JolokiaManagementContextConfigurationTests.java @@ -53,7 +53,7 @@ public class JolokiaManagementContextConfigurationTests { ServletRegistrationBean registrationBean = context .getBean(ServletRegistrationBean.class); assertThat(registrationBean.getUrlMappings()) - .contains("/application/jolokia/*"); + .contains("/actuator/jolokia/*"); assertThat(registrationBean.getInitParameters()).isEmpty(); }); } @@ -69,7 +69,7 @@ public class JolokiaManagementContextConfigurationTests { this.contextRunner .withPropertyValues("management.jolokia.enabled=true", "management.jolokia.path=/lokia") - .run(isDefinedOnPath("/application/lokia/*")); + .run(isDefinedOnPath("/actuator/lokia/*")); } @Test diff --git a/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/security/EndpointRequestTests.java b/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/security/EndpointRequestTests.java index eadfb762b3e..5045baa740b 100644 --- a/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/security/EndpointRequestTests.java +++ b/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/security/EndpointRequestTests.java @@ -44,53 +44,53 @@ public class EndpointRequestTests { @Test public void toAnyEndpointShouldMatchEndpointPath() throws Exception { RequestMatcher matcher = EndpointRequest.toAnyEndpoint(); - assertMatcher(matcher).matches("/application/foo"); - assertMatcher(matcher).matches("/application/bar"); + assertMatcher(matcher).matches("/actuator/foo"); + assertMatcher(matcher).matches("/actuator/bar"); } @Test public void toAnyEndpointShouldNotMatchOtherPath() throws Exception { RequestMatcher matcher = EndpointRequest.toAnyEndpoint(); - assertMatcher(matcher).doesNotMatch("/application/baz"); + assertMatcher(matcher).doesNotMatch("/actuator/baz"); } @Test public void toEndpointClassShouldMatchEndpointPath() throws Exception { RequestMatcher matcher = EndpointRequest.to(FooEndpoint.class); - assertMatcher(matcher).matches("/application/foo"); + assertMatcher(matcher).matches("/actuator/foo"); } @Test public void toEndpointClassShouldNotMatchOtherPath() throws Exception { RequestMatcher matcher = EndpointRequest.to(FooEndpoint.class); - assertMatcher(matcher).doesNotMatch("/application/bar"); + assertMatcher(matcher).doesNotMatch("/actuator/bar"); } @Test public void toEndpointIdShouldMatchEndpointPath() throws Exception { RequestMatcher matcher = EndpointRequest.to("foo"); - assertMatcher(matcher).matches("/application/foo"); + assertMatcher(matcher).matches("/actuator/foo"); } @Test public void toEndpointIdShouldNotMatchOtherPath() throws Exception { RequestMatcher matcher = EndpointRequest.to("foo"); - assertMatcher(matcher).doesNotMatch("/application/bar"); + assertMatcher(matcher).doesNotMatch("/actuator/bar"); } @Test public void excludeByClassShouldNotMatchExcluded() throws Exception { RequestMatcher matcher = EndpointRequest.toAnyEndpoint() .excluding(FooEndpoint.class); - assertMatcher(matcher).doesNotMatch("/application/foo"); - assertMatcher(matcher).matches("/application/bar"); + assertMatcher(matcher).doesNotMatch("/actuator/foo"); + assertMatcher(matcher).matches("/actuator/bar"); } @Test public void excludeByIdShouldNotMatchExcluded() throws Exception { RequestMatcher matcher = EndpointRequest.toAnyEndpoint().excluding("foo"); - assertMatcher(matcher).doesNotMatch("/application/foo"); - assertMatcher(matcher).matches("/application/bar"); + assertMatcher(matcher).doesNotMatch("/actuator/foo"); + assertMatcher(matcher).matches("/actuator/bar"); } private RequestMatcherAssert assertMatcher(RequestMatcher matcher) { @@ -164,16 +164,16 @@ public class EndpointRequestTests { @Override public List getPaths() { - return Arrays.asList("/application/foo", "/application/bar"); + return Arrays.asList("/actuator/foo", "/actuator/bar"); } @Override public String getPath(String id) { if ("foo".equals(id)) { - return "/application/foo"; + return "/actuator/foo"; } if ("bar".equals(id)) { - return "/application/bar"; + return "/actuator/bar"; } return null; } diff --git a/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/web/servlet/RequestMappingEndpointTests.java b/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/web/servlet/RequestMappingEndpointTests.java index dbf34d71b79..8d6ecb4a760 100644 --- a/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/web/servlet/RequestMappingEndpointTests.java +++ b/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/web/servlet/RequestMappingEndpointTests.java @@ -102,12 +102,11 @@ public class RequestMappingEndpointTests { this.endpoint.setApplicationContext(context); Map result = this.endpoint.mappings(); assertThat(result).hasSize(2); - assertThat(result.keySet()) - .filteredOn((key) -> key.contains("[/application/test]")) + assertThat(result.keySet()).filteredOn((key) -> key.contains("[/actuator/test]")) .hasOnlyOneElementSatisfying( (key) -> assertThat((Map) result.get(key)) .containsOnlyKeys("bean", "method")); - assertThat(result.keySet()).filteredOn((key) -> key.contains("[/application]")) + assertThat(result.keySet()).filteredOn((key) -> key.contains("[/actuator]")) .hasOnlyOneElementSatisfying( (key) -> assertThat((Map) result.get(key)) .containsOnlyKeys("bean", "method")); @@ -120,12 +119,11 @@ public class RequestMappingEndpointTests { this.endpoint.setMethodMappings(Collections.singletonList(mapping)); Map result = this.endpoint.mappings(); assertThat(result).hasSize(2); - assertThat(result.keySet()) - .filteredOn((key) -> key.contains("[/application/test]")) + assertThat(result.keySet()).filteredOn((key) -> key.contains("[/actuator/test]")) .hasOnlyOneElementSatisfying( (key) -> assertThat((Map) result.get(key)) .containsOnlyKeys("method")); - assertThat(result.keySet()).filteredOn((key) -> key.contains("[/application]")) + assertThat(result.keySet()).filteredOn((key) -> key.contains("[/actuator]")) .hasOnlyOneElementSatisfying( (key) -> assertThat((Map) result.get(key)) .containsOnlyKeys("method")); @@ -138,7 +136,7 @@ public class RequestMappingEndpointTests { WebOperation operation = new WebOperation(OperationType.READ, (arguments) -> "Invoked", true, requestPredicate, "test"); WebMvcEndpointHandlerMapping mapping = new WebMvcEndpointHandlerMapping( - new EndpointMapping("application"), + new EndpointMapping("actuator"), Collections.singleton(new EndpointInfo<>("test", true, Collections.singleton(operation))), new EndpointMediaTypes(Arrays.asList("application/vnd.test+json"), diff --git a/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/audit/AuditEventsEndpointWebIntegrationTests.java b/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/audit/AuditEventsEndpointWebIntegrationTests.java index 58dc634b63c..42adce6bc29 100644 --- a/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/audit/AuditEventsEndpointWebIntegrationTests.java +++ b/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/audit/AuditEventsEndpointWebIntegrationTests.java @@ -43,14 +43,14 @@ public class AuditEventsEndpointWebIntegrationTests { @Test public void eventsWithoutParams() throws Exception { - client.get().uri((builder) -> builder.path("/application/auditevents").build()) + client.get().uri((builder) -> builder.path("/actuator/auditevents").build()) .exchange().expectStatus().isBadRequest(); } @Test public void eventsWithDateAfter() throws Exception { client.get() - .uri((builder) -> builder.path("/application/auditevents") + .uri((builder) -> builder.path("/actuator/auditevents") .queryParam("after", "2016-11-01T13:00:00%2B00:00").build()) .exchange().expectStatus().isOk().expectBody().jsonPath("events") .isEmpty(); @@ -59,7 +59,7 @@ public class AuditEventsEndpointWebIntegrationTests { @Test public void eventsWithPrincipalAndDateAfter() throws Exception { client.get() - .uri((builder) -> builder.path("/application/auditevents") + .uri((builder) -> builder.path("/actuator/auditevents") .queryParam("after", "2016-11-01T10:00:00%2B00:00") .queryParam("principal", "user").build()) .exchange().expectStatus().isOk().expectBody() @@ -70,7 +70,7 @@ public class AuditEventsEndpointWebIntegrationTests { @Test public void eventsWithPrincipalDateAfterAndType() throws Exception { client.get() - .uri((builder) -> builder.path("/application/auditevents") + .uri((builder) -> builder.path("/actuator/auditevents") .queryParam("after", "2016-11-01T10:00:00%2B00:00") .queryParam("principal", "admin").queryParam("type", "logout") .build()) diff --git a/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/endpoint/web/EndpointLinksResolverTests.java b/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/endpoint/web/EndpointLinksResolverTests.java index d3b5553d184..6b4395389b5 100644 --- a/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/endpoint/web/EndpointLinksResolverTests.java +++ b/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/endpoint/web/EndpointLinksResolverTests.java @@ -40,19 +40,19 @@ public class EndpointLinksResolverTests { @Test public void linkResolutionWithTrailingSlashStripsSlashOnSelfLink() { Map links = this.linksResolver.resolveLinks(Collections.emptyList(), - "https://api.example.com/application/"); + "https://api.example.com/actuator/"); assertThat(links).hasSize(1); assertThat(links).hasEntrySatisfying("self", - linkWithHref("https://api.example.com/application")); + linkWithHref("https://api.example.com/actuator")); } @Test public void linkResolutionWithoutTrailingSlash() { Map links = this.linksResolver.resolveLinks(Collections.emptyList(), - "https://api.example.com/application"); + "https://api.example.com/actuator"); assertThat(links).hasSize(1); assertThat(links).hasEntrySatisfying("self", - linkWithHref("https://api.example.com/application")); + linkWithHref("https://api.example.com/actuator")); } @Test @@ -63,14 +63,14 @@ public class EndpointLinksResolverTests { Arrays.asList(operationWithPath("/alpha", "alpha"), operationWithPath("/alpha/{name}", "alpha-name")))), - "https://api.example.com/application"); + "https://api.example.com/actuator"); assertThat(links).hasSize(3); assertThat(links).hasEntrySatisfying("self", - linkWithHref("https://api.example.com/application")); + linkWithHref("https://api.example.com/actuator")); assertThat(links).hasEntrySatisfying("alpha", - linkWithHref("https://api.example.com/application/alpha")); + linkWithHref("https://api.example.com/actuator/alpha")); assertThat(links).hasEntrySatisfying("alpha-name", - linkWithHref("https://api.example.com/application/alpha/{name}")); + linkWithHref("https://api.example.com/actuator/alpha/{name}")); } private WebOperation operationWithPath(String path, String id) { diff --git a/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/endpoint/web/test/JerseyEndpointsRunner.java b/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/endpoint/web/test/JerseyEndpointsRunner.java index 327f8ee19dd..9f447a92a9c 100644 --- a/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/endpoint/web/test/JerseyEndpointsRunner.java +++ b/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/endpoint/web/test/JerseyEndpointsRunner.java @@ -101,7 +101,7 @@ class JerseyEndpointsRunner extends AbstractWebEndpointRunner { this.applicationContext, new ConversionServiceParameterMapper(), endpointMediaTypes, EndpointPathResolver.useEndpointId(), null, null); Collection resources = new JerseyEndpointResourceFactory() - .createEndpointResources(new EndpointMapping("/application"), + .createEndpointResources(new EndpointMapping("/actuator"), discoverer.discoverEndpoints(), endpointMediaTypes); config.registerResources(new HashSet<>(resources)); } diff --git a/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/endpoint/web/test/WebFluxEndpointsRunner.java b/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/endpoint/web/test/WebFluxEndpointsRunner.java index e2e19b04c8a..5afe9907377 100644 --- a/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/endpoint/web/test/WebFluxEndpointsRunner.java +++ b/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/endpoint/web/test/WebFluxEndpointsRunner.java @@ -106,7 +106,7 @@ class WebFluxEndpointsRunner extends AbstractWebEndpointRunner { WebAnnotationEndpointDiscoverer discoverer = new WebAnnotationEndpointDiscoverer( this.applicationContext, new ConversionServiceParameterMapper(), endpointMediaTypes, EndpointPathResolver.useEndpointId(), null, null); - return new WebFluxEndpointHandlerMapping(new EndpointMapping("/application"), + return new WebFluxEndpointHandlerMapping(new EndpointMapping("/actuator"), discoverer.discoverEndpoints(), endpointMediaTypes, new CorsConfiguration()); } diff --git a/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/endpoint/web/test/WebMvcEndpointRunner.java b/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/endpoint/web/test/WebMvcEndpointRunner.java index a0baec81972..e3258c8cfc3 100644 --- a/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/endpoint/web/test/WebMvcEndpointRunner.java +++ b/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/endpoint/web/test/WebMvcEndpointRunner.java @@ -89,7 +89,7 @@ class WebMvcEndpointRunner extends AbstractWebEndpointRunner { WebAnnotationEndpointDiscoverer discoverer = new WebAnnotationEndpointDiscoverer( this.applicationContext, new ConversionServiceParameterMapper(), endpointMediaTypes, EndpointPathResolver.useEndpointId(), null, null); - return new WebMvcEndpointHandlerMapping(new EndpointMapping("/application"), + return new WebMvcEndpointHandlerMapping(new EndpointMapping("/actuator"), discoverer.discoverEndpoints(), endpointMediaTypes, new CorsConfiguration()); } diff --git a/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/env/EnvironmentEndpointWebIntegrationTests.java b/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/env/EnvironmentEndpointWebIntegrationTests.java index 3f3f84187d1..1b7cbc5c926 100644 --- a/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/env/EnvironmentEndpointWebIntegrationTests.java +++ b/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/env/EnvironmentEndpointWebIntegrationTests.java @@ -46,13 +46,13 @@ public class EnvironmentEndpointWebIntegrationTests { @Test public void home() throws Exception { - client.get().uri("/application/env").exchange().expectStatus().isOk().expectBody() + client.get().uri("/actuator/env").exchange().expectStatus().isOk().expectBody() .jsonPath("propertySources[?(@.name=='systemProperties')]").exists(); } @Test public void sub() throws Exception { - client.get().uri("/application/env/foo").exchange().expectStatus().isOk() + client.get().uri("/actuator/env/foo").exchange().expectStatus().isOk() .expectBody().jsonPath("property.source").isEqualTo("test") .jsonPath("property.value").isEqualTo("bar"); } @@ -63,8 +63,8 @@ public class EnvironmentEndpointWebIntegrationTests { map.put("food", null); EnvironmentEndpointWebIntegrationTests.context.getEnvironment() .getPropertySources().addFirst(new MapPropertySource("null-value", map)); - client.get().uri("/application/env?pattern=foo.*").exchange().expectStatus() - .isOk().expectBody().jsonPath(forProperty("test", "foo")).isEqualTo("bar") + client.get().uri("/actuator/env?pattern=foo.*").exchange().expectStatus().isOk() + .expectBody().jsonPath(forProperty("test", "foo")).isEqualTo("bar") .jsonPath(forProperty("test", "fool")).isEqualTo("baz"); } @@ -75,7 +75,7 @@ public class EnvironmentEndpointWebIntegrationTests { map.put("my.foo", "${my.bar}"); context.getEnvironment().getPropertySources() .addFirst(new MapPropertySource("unresolved-placeholder", map)); - client.get().uri("/application/env/my.foo").exchange().expectStatus().isOk() + client.get().uri("/actuator/env/my.foo").exchange().expectStatus().isOk() .expectBody().jsonPath("property.value").isEqualTo("${my.bar}") .jsonPath(forPropertyEntry("unresolved-placeholder")) .isEqualTo("${my.bar}"); @@ -88,14 +88,14 @@ public class EnvironmentEndpointWebIntegrationTests { map.put("my.password", "hello"); context.getEnvironment().getPropertySources() .addFirst(new MapPropertySource("placeholder", map)); - client.get().uri("/application/env/my.foo").exchange().expectStatus().isOk() + client.get().uri("/actuator/env/my.foo").exchange().expectStatus().isOk() .expectBody().jsonPath("property.value").isEqualTo("******") .jsonPath(forPropertyEntry("placeholder")).isEqualTo("******"); } @Test public void nestedPathForUnknownKeyShouldReturn404AndBody() throws Exception { - client.get().uri("/application/env/this.does.not.exist").exchange().expectStatus() + client.get().uri("/actuator/env/this.does.not.exist").exchange().expectStatus() .isNotFound().expectBody().jsonPath("property").doesNotExist() .jsonPath("propertySources[?(@.name=='test')]").exists() .jsonPath("propertySources[?(@.name=='systemProperties')]").exists() @@ -109,7 +109,7 @@ public class EnvironmentEndpointWebIntegrationTests { map.put("my.foo", "${my.bar}"); context.getEnvironment().getPropertySources() .addFirst(new MapPropertySource("unresolved-placeholder", map)); - client.get().uri("/application/env?pattern=my.*").exchange().expectStatus().isOk() + client.get().uri("/actuator/env?pattern=my.*").exchange().expectStatus().isOk() .expectBody() .jsonPath( "propertySources[?(@.name=='unresolved-placeholder')].properties.['my.foo'].value") @@ -124,7 +124,7 @@ public class EnvironmentEndpointWebIntegrationTests { map.put("my.password", "hello"); context.getEnvironment().getPropertySources() .addFirst(new MapPropertySource("placeholder", map)); - client.get().uri("/application/env?pattern=my.*").exchange().expectStatus().isOk() + client.get().uri("/actuator/env?pattern=my.*").exchange().expectStatus().isOk() .expectBody().jsonPath(forProperty("placeholder", "my.foo")) .isEqualTo("******"); } diff --git a/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/health/HealthEndpointWebIntegrationTests.java b/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/health/HealthEndpointWebIntegrationTests.java index f18df378bad..7f16e1aaefe 100644 --- a/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/health/HealthEndpointWebIntegrationTests.java +++ b/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/health/HealthEndpointWebIntegrationTests.java @@ -43,17 +43,16 @@ public class HealthEndpointWebIntegrationTests { @Test public void whenHealthIsUp200ResponseIsReturned() throws Exception { - client.get().uri("/application/health").exchange().expectStatus().isOk() - .expectBody().jsonPath("status").isEqualTo("UP") - .jsonPath("details.alpha.status").isEqualTo("UP") - .jsonPath("details.bravo.status").isEqualTo("UP"); + client.get().uri("/actuator/health").exchange().expectStatus().isOk().expectBody() + .jsonPath("status").isEqualTo("UP").jsonPath("details.alpha.status") + .isEqualTo("UP").jsonPath("details.bravo.status").isEqualTo("UP"); } @Test public void whenHealthIsDown503ResponseIsReturned() throws Exception { context.getBean("alphaHealthIndicator", TestHealthIndicator.class) .setHealth(Health.down().build()); - client.get().uri("/application/health").exchange().expectStatus() + client.get().uri("/actuator/health").exchange().expectStatus() .isEqualTo(HttpStatus.SERVICE_UNAVAILABLE).expectBody().jsonPath("status") .isEqualTo("DOWN").jsonPath("details.alpha.status").isEqualTo("DOWN") .jsonPath("details.bravo.status").isEqualTo("UP"); diff --git a/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/info/InfoEndpointWebIntegrationTests.java b/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/info/InfoEndpointWebIntegrationTests.java index 71e538a78a3..520158f26ea 100644 --- a/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/info/InfoEndpointWebIntegrationTests.java +++ b/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/info/InfoEndpointWebIntegrationTests.java @@ -45,8 +45,8 @@ public class InfoEndpointWebIntegrationTests { @Test public void info() throws Exception { - client.get().uri("/application/info").accept(MediaType.APPLICATION_JSON) - .exchange().expectStatus().isOk().expectBody().jsonPath("beanName1.key11") + client.get().uri("/actuator/info").accept(MediaType.APPLICATION_JSON).exchange() + .expectStatus().isOk().expectBody().jsonPath("beanName1.key11") .isEqualTo("value11").jsonPath("beanName1.key12").isEqualTo("value12") .jsonPath("beanName2.key21").isEqualTo("value21") .jsonPath("beanName2.key22").isEqualTo("value22"); diff --git a/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/logging/LogFileWebEndpointWebIntegrationTests.java b/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/logging/LogFileWebEndpointWebIntegrationTests.java index 585417170d9..9481158c394 100644 --- a/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/logging/LogFileWebEndpointWebIntegrationTests.java +++ b/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/logging/LogFileWebEndpointWebIntegrationTests.java @@ -60,14 +60,14 @@ public class LogFileWebEndpointWebIntegrationTests { @Test public void getRequestProduces404ResponseWhenLogFileNotFound() throws Exception { - client.get().uri("/application/logfile").exchange().expectStatus().isNotFound(); + client.get().uri("/actuator/logfile").exchange().expectStatus().isNotFound(); } @Test public void getRequestProducesResponseWithLogFile() throws Exception { TestPropertyValues.of("logging.file:" + this.logFile.getAbsolutePath()) .applyTo(context); - client.get().uri("/application/logfile").exchange().expectStatus().isOk() + client.get().uri("/actuator/logfile").exchange().expectStatus().isOk() .expectBody(String.class).isEqualTo("--TEST--"); } diff --git a/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/logging/LoggersEndpointWebIntegrationTests.java b/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/logging/LoggersEndpointWebIntegrationTests.java index 858736e6ac6..7a2815c4e5c 100644 --- a/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/logging/LoggersEndpointWebIntegrationTests.java +++ b/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/logging/LoggersEndpointWebIntegrationTests.java @@ -75,7 +75,7 @@ public class LoggersEndpointWebIntegrationTests { public void getLoggerShouldReturnAllLoggerConfigurations() throws Exception { given(this.loggingSystem.getLoggerConfigurations()).willReturn(Collections .singletonList(new LoggerConfiguration("ROOT", null, LogLevel.DEBUG))); - client.get().uri("/application/loggers").exchange().expectStatus().isOk() + client.get().uri("/actuator/loggers").exchange().expectStatus().isOk() .expectBody().jsonPath("$.length()").isEqualTo(2).jsonPath("levels") .isEqualTo(jsonArrayOf("OFF", "FATAL", "ERROR", "WARN", "INFO", "DEBUG", "TRACE")) @@ -89,7 +89,7 @@ public class LoggersEndpointWebIntegrationTests { public void getLoggerShouldReturnLogLevels() throws Exception { given(this.loggingSystem.getLoggerConfiguration("ROOT")) .willReturn(new LoggerConfiguration("ROOT", null, LogLevel.DEBUG)); - client.get().uri("/application/loggers/ROOT").exchange().expectStatus().isOk() + client.get().uri("/actuator/loggers/ROOT").exchange().expectStatus().isOk() .expectBody().jsonPath("$.length()").isEqualTo(2) .jsonPath("configuredLevel").isEqualTo(null).jsonPath("effectiveLevel") .isEqualTo("DEBUG"); @@ -97,13 +97,13 @@ public class LoggersEndpointWebIntegrationTests { @Test public void getLoggersWhenLoggerNotFoundShouldReturnNotFound() throws Exception { - client.get().uri("/application/loggers/com.does.not.exist").exchange() - .expectStatus().isNotFound(); + client.get().uri("/actuator/loggers/com.does.not.exist").exchange().expectStatus() + .isNotFound(); } @Test public void setLoggerUsingApplicationJsonShouldSetLogLevel() throws Exception { - client.post().uri("/application/loggers/ROOT") + client.post().uri("/actuator/loggers/ROOT") .contentType(MediaType.APPLICATION_JSON) .syncBody(Collections.singletonMap("configuredLevel", "debug")).exchange() .expectStatus().isNoContent(); @@ -112,7 +112,7 @@ public class LoggersEndpointWebIntegrationTests { @Test public void setLoggerUsingActuatorV2JsonShouldSetLogLevel() throws Exception { - client.post().uri("/application/loggers/ROOT") + client.post().uri("/actuator/loggers/ROOT") .contentType(MediaType.parseMediaType(ActuatorMediaType.V2_JSON)) .syncBody(Collections.singletonMap("configuredLevel", "debug")).exchange() .expectStatus().isNoContent(); @@ -121,7 +121,7 @@ public class LoggersEndpointWebIntegrationTests { @Test public void setLoggerWithWrongLogLevelResultInBadRequestResponse() throws Exception { - client.post().uri("/application/loggers/ROOT") + client.post().uri("/actuator/loggers/ROOT") .contentType(MediaType.APPLICATION_JSON) .syncBody(Collections.singletonMap("configuredLevel", "other")).exchange() .expectStatus().isBadRequest(); @@ -130,7 +130,7 @@ public class LoggersEndpointWebIntegrationTests { @Test public void setLoggerWithNullLogLevel() throws Exception { - client.post().uri("/application/loggers/ROOT") + client.post().uri("/actuator/loggers/ROOT") .contentType(MediaType.parseMediaType(ActuatorMediaType.V2_JSON)) .syncBody(Collections.singletonMap("configuredLevel", null)).exchange() .expectStatus().isNoContent(); @@ -139,7 +139,7 @@ public class LoggersEndpointWebIntegrationTests { @Test public void setLoggerWithNoLogLevel() throws Exception { - client.post().uri("/application/loggers/ROOT") + client.post().uri("/actuator/loggers/ROOT") .contentType(MediaType.parseMediaType(ActuatorMediaType.V2_JSON)) .syncBody(Collections.emptyMap()).exchange().expectStatus().isNoContent(); verify(this.loggingSystem).setLogLevel("ROOT", null); @@ -150,7 +150,7 @@ public class LoggersEndpointWebIntegrationTests { throws Exception { given(this.loggingSystem.getLoggerConfiguration("com.png")) .willReturn(new LoggerConfiguration("com.png", null, LogLevel.DEBUG)); - client.get().uri("/application/loggers/com.png").exchange().expectStatus().isOk() + client.get().uri("/actuator/loggers/com.png").exchange().expectStatus().isOk() .expectBody().jsonPath("$.length()").isEqualTo(2) .jsonPath("configuredLevel").isEqualTo(null).jsonPath("effectiveLevel") .isEqualTo("DEBUG"); diff --git a/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/management/HeapDumpWebEndpointWebIntegrationTests.java b/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/management/HeapDumpWebEndpointWebIntegrationTests.java index 42b41aca7a1..1ff9f4a5514 100644 --- a/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/management/HeapDumpWebEndpointWebIntegrationTests.java +++ b/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/management/HeapDumpWebEndpointWebIntegrationTests.java @@ -61,13 +61,13 @@ public class HeapDumpWebEndpointWebIntegrationTests { public void invokeWhenNotAvailableShouldReturnServiceUnavailableStatus() throws Exception { this.endpoint.setAvailable(false); - client.get().uri("/application/heapdump").exchange().expectStatus() + client.get().uri("/actuator/heapdump").exchange().expectStatus() .isEqualTo(HttpStatus.SERVICE_UNAVAILABLE); } @Test public void getRequestShouldReturnHeapDumpInResponseBody() throws Exception { - client.get().uri("/application/heapdump").exchange().expectStatus().isOk() + client.get().uri("/actuator/heapdump").exchange().expectStatus().isOk() .expectHeader().contentType(MediaType.APPLICATION_OCTET_STREAM) .expectBody(String.class).isEqualTo("HEAPDUMP"); assertHeapDumpFileIsDeleted(); diff --git a/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/metrics/MetricsEndpointWebIntegrationTests.java b/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/metrics/MetricsEndpointWebIntegrationTests.java index 94cab377630..bb68e591f78 100644 --- a/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/metrics/MetricsEndpointWebIntegrationTests.java +++ b/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/metrics/MetricsEndpointWebIntegrationTests.java @@ -55,7 +55,7 @@ public class MetricsEndpointWebIntegrationTests { @Test @SuppressWarnings("unchecked") public void listNames() throws IOException { - String responseBody = client.get().uri("/application/metrics").exchange() + String responseBody = client.get().uri("/actuator/metrics").exchange() .expectStatus().isOk().expectBody(String.class).returnResult() .getResponseBody(); Map> names = this.mapper.readValue(responseBody, Map.class); @@ -65,7 +65,7 @@ public class MetricsEndpointWebIntegrationTests { @Test public void selectByName() throws IOException { MockClock.clock(registry).add(SimpleConfig.DEFAULT_STEP); - client.get().uri("/application/metrics/jvm.memory.used").exchange().expectStatus() + client.get().uri("/actuator/metrics/jvm.memory.used").exchange().expectStatus() .isOk().expectBody().jsonPath("$.name").isEqualTo("jvm.memory.used"); } @@ -73,7 +73,7 @@ public class MetricsEndpointWebIntegrationTests { public void selectByTag() { MockClock.clock(registry).add(SimpleConfig.DEFAULT_STEP); client.get() - .uri("/application/metrics/jvm.memory.used?tag=id:Compressed%20Class%20Space") + .uri("/actuator/metrics/jvm.memory.used?tag=id:Compressed%20Class%20Space") .exchange().expectStatus().isOk().expectBody().jsonPath("$.name") .isEqualTo("jvm.memory.used"); } diff --git a/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/metrics/export/prometheus/PrometheusScrapeEndpointIntegrationTests.java b/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/metrics/export/prometheus/PrometheusScrapeEndpointIntegrationTests.java index 3ad537e10ce..218d3694cf5 100644 --- a/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/metrics/export/prometheus/PrometheusScrapeEndpointIntegrationTests.java +++ b/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/metrics/export/prometheus/PrometheusScrapeEndpointIntegrationTests.java @@ -42,7 +42,7 @@ public class PrometheusScrapeEndpointIntegrationTests { @Test public void scrapeHasContentTypeText004() { - client.get().uri("/application/prometheus").exchange().expectStatus().isOk() + client.get().uri("/actuator/prometheus").exchange().expectStatus().isOk() .expectHeader() .contentType(MediaType.parseMediaType(TextFormat.CONTENT_TYPE_004)); } diff --git a/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/session/SessionsEndpointWebIntegrationTests.java b/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/session/SessionsEndpointWebIntegrationTests.java index 00320ecb25a..14ff946e074 100644 --- a/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/session/SessionsEndpointWebIntegrationTests.java +++ b/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/session/SessionsEndpointWebIntegrationTests.java @@ -52,7 +52,7 @@ public class SessionsEndpointWebIntegrationTests { @Test public void sessionsForUsernameWithoutUsernameParam() throws Exception { - client.get().uri((builder) -> builder.path("/application/sessions").build()) + client.get().uri((builder) -> builder.path("/actuator/sessions").build()) .exchange().expectStatus().isBadRequest(); } @@ -62,7 +62,7 @@ public class SessionsEndpointWebIntegrationTests { FindByIndexNameSessionRepository.PRINCIPAL_NAME_INDEX_NAME, "user")) .willReturn(Collections.emptyMap()); client.get() - .uri((builder) -> builder.path("/application/sessions") + .uri((builder) -> builder.path("/actuator/sessions") .queryParam("username", "user").build()) .exchange().expectStatus().isOk().expectBody().jsonPath("sessions") .isEmpty(); @@ -74,7 +74,7 @@ public class SessionsEndpointWebIntegrationTests { FindByIndexNameSessionRepository.PRINCIPAL_NAME_INDEX_NAME, "user")) .willReturn(Collections.singletonMap(session.getId(), session)); client.get() - .uri((builder) -> builder.path("/application/sessions") + .uri((builder) -> builder.path("/actuator/sessions") .queryParam("username", "user").build()) .exchange().expectStatus().isOk().expectBody().jsonPath("sessions.[*].id") .isEqualTo(new JSONArray().appendElement(session.getId())); diff --git a/spring-boot-project/spring-boot-docs/src/main/asciidoc/appendix-application-properties.adoc b/spring-boot-project/spring-boot-docs/src/main/asciidoc/appendix-application-properties.adoc index 42b094d55fc..274d310a60e 100644 --- a/spring-boot-project/spring-boot-docs/src/main/asciidoc/appendix-application-properties.adoc +++ b/spring-boot-project/spring-boot-docs/src/main/asciidoc/appendix-application-properties.adoc @@ -1125,7 +1125,7 @@ content into your application. Rather, pick only the properties that you need. management.endpoints.web.enabled=true # Whether web endpoints are enabled management.endpoints.web.expose=info,status # Endpoint IDs that should be exposed or '*' for all. management.endpoints.web.exclude= # Endpoint IDs that should be excluded. - management.endpoints.web.base-path=/application # Base path for Web endpoints. Relative to server.context-path or management.server.context-path if management.server.port is configured. + management.endpoints.web.base-path=/actuator # Base path for Web endpoints. Relative to server.context-path or management.server.context-path if management.server.port is configured. management.endpoints.web.path-mapping= # Mapping between endpoint IDs and the path that should expose them. # ENDPOINTS CORS CONFIGURATION ({sc-spring-boot-actuator-autoconfigure}/endpoint/web/servlet/CorsEndpointProperties.{sc-ext}[CorsEndpointProperties]) diff --git a/spring-boot-project/spring-boot-docs/src/main/asciidoc/howto.adoc b/spring-boot-project/spring-boot-docs/src/main/asciidoc/howto.adoc index 7e451f0ba77..c25d19fad8e 100644 --- a/spring-boot-project/spring-boot-docs/src/main/asciidoc/howto.adoc +++ b/spring-boot-project/spring-boot-docs/src/main/asciidoc/howto.adoc @@ -65,7 +65,7 @@ reading the code, remember the following rules of thumb: `+@Conditional*+` annotations to find out what features they enable and when. Add `--debug` to the command line or a System property `-Ddebug` to get a log on the console of all the auto-configuration decisions that were made in your app. In a running - Actuator app, look at the `conditions` endpoint (`/application/conditions` or the JMX + Actuator app, look at the `conditions` endpoint (`/actuator/conditions` or the JMX equivalent) for the same information. * Look for classes that are `@ConfigurationProperties` (such as {sc-spring-boot-autoconfigure}/web/ServerProperties.{sc-ext}[`ServerProperties`]) diff --git a/spring-boot-project/spring-boot-docs/src/main/asciidoc/production-ready-features.adoc b/spring-boot-project/spring-boot-docs/src/main/asciidoc/production-ready-features.adoc index 10298a4a0db..85b6dff98d8 100644 --- a/spring-boot-project/spring-boot-docs/src/main/asciidoc/production-ready-features.adoc +++ b/spring-boot-project/spring-boot-docs/src/main/asciidoc/production-ready-features.adoc @@ -55,8 +55,8 @@ includes a number of built-in endpoints and lets you add your own. For example, The way that endpoints are exposed depends on the type of technology that you choose. Most applications choose HTTP monitoring, where the ID of the endpoint along with a -prefix of `/application` is mapped to a URL. For example, by default, the `health` -endpoint is mapped to `/application/health`. +prefix of `/actuator` is mapped to a URL. For example, by default, the `health` +endpoint is mapped to `/actuator/health`. The following technology-agnostic endpoints are available: @@ -257,10 +257,10 @@ and `exclude` properties (see <>) [[production-ready-endpoint-hypermedia]] === Hypermedia for Actuator Web Endpoints A "`discovery page`" is added with links to all the endpoints. The "`discovery page`" is -available on `/application` by default. +available on `/actuator` by default. When a custom management context path is configured, the "`discovery page`" automatically -moves from `/application` to the root of the management context. For example, if the +moves from `/actuator` to the root of the management context. For example, if the management context path is `/management`, then the discovery page is available from `/management`. When the management context path is set to `/`, the discovery page is disabled to prevent the possibility of a clash with other mappings. @@ -269,13 +269,13 @@ disabled to prevent the possibility of a clash with other mappings. [[production-ready-endpoint-custom-mapping]] === Actuator Web Endpoint Paths -By default, endpoints are exposed over HTTP under the `/application` path using ID of the -endpoint. For example, the `beans` endpoint is exposed under `/application/beans`. If you +By default, endpoints are exposed over HTTP under the `/actuator` path using ID of the +endpoint. For example, the `beans` endpoint is exposed under `/actuator/beans`. If you want to map endpoints to a different path you can use the `management.endpoints.web.path-mapping` property. You can also use `management.endpoints.web.base-path` if you want change the base path. -Here's an example that remaps `/application/health` to `/healthcheck`: +Here's an example that remaps `/actuator/health` to `/healthcheck`: .application.properties [source,properties,indent=0] @@ -642,15 +642,15 @@ additional entry: == Monitoring and Management over HTTP If you are developing a Spring MVC application, Spring Boot Actuator auto-configures all enabled endpoints to be exposed over HTTP. The default convention is to use the `id` of -the endpoint with a prefix of `/application` as the URL path. For example, `health` is -exposed as `/application/health`. +the endpoint with a prefix of `/actuator` as the URL path. For example, `health` is +exposed as `/actuator/health`. [[production-ready-customizing-management-server-context-path]] === Customizing the Management Endpoint Paths Sometimes, it is useful to customize the prefix for the management endpoints. For -example, your application might already use `/application` for another purpose. You can +example, your application might already use `/actuator` for another purpose. You can use the `management.endpoints.web.base-path` property to change the prefix for your management endpoint, as shown in the following example: @@ -660,7 +660,7 @@ management endpoint, as shown in the following example: ---- The preceding `application.properties` example changes the endpoint from -`/application/{id}` to `/manage/{id}` (e.g. `/manage/info`). +`/actuator/{id}` to `/manage/{id}` (e.g. `/manage/info`). NOTE: Unless the management port has been configured to < ---- -Jolokia can then be accessed by using `/application/jolokia` on your management HTTP +Jolokia can then be accessed by using `/actuator/jolokia` on your management HTTP server. diff --git a/spring-boot-project/spring-boot-docs/src/main/asciidoc/spring-boot-features.adoc b/spring-boot-project/spring-boot-docs/src/main/asciidoc/spring-boot-features.adoc index 0f4ed564f7f..2b1d09e694d 100644 --- a/spring-boot-project/spring-boot-docs/src/main/asciidoc/spring-boot-features.adoc +++ b/spring-boot-project/spring-boot-docs/src/main/asciidoc/spring-boot-features.adoc @@ -1247,7 +1247,7 @@ validation sample] that shows how to set things up. TIP: The `spring-boot-actuator` module includes an endpoint that exposes all `@ConfigurationProperties` beans. Point your web browser to -`/application/configprops` or use the equivalent JMX endpoint. See the +`/actuator/configprops` or use the equivalent JMX endpoint. See the "<>" section for details. diff --git a/spring-boot-samples/spring-boot-sample-actuator-custom-security/src/test/java/sample/actuator/customsecurity/CorsSampleActuatorApplicationTests.java b/spring-boot-samples/spring-boot-sample-actuator-custom-security/src/test/java/sample/actuator/customsecurity/CorsSampleActuatorApplicationTests.java index b4ca42c97c3..574289f025f 100644 --- a/spring-boot-samples/spring-boot-sample-actuator-custom-security/src/test/java/sample/actuator/customsecurity/CorsSampleActuatorApplicationTests.java +++ b/spring-boot-samples/spring-boot-sample-actuator-custom-security/src/test/java/sample/actuator/customsecurity/CorsSampleActuatorApplicationTests.java @@ -65,15 +65,14 @@ public class CorsSampleActuatorApplicationTests { @Test public void endpointShouldReturnUnauthorized() throws Exception { - ResponseEntity entity = this.testRestTemplate.getForEntity("/application/env", + ResponseEntity entity = this.testRestTemplate.getForEntity("/actuator/env", Map.class); assertThat(entity.getStatusCode()).isEqualTo(HttpStatus.UNAUTHORIZED); } @Test public void preflightRequestToEndpointShouldReturnOk() throws Exception { - RequestEntity healthRequest = RequestEntity - .options(new URI("/application/env")) + RequestEntity healthRequest = RequestEntity.options(new URI("/actuator/env")) .header("Origin", "http://localhost:8080") .header("Access-Control-Request-Method", "GET").build(); ResponseEntity exchange = this.testRestTemplate.exchange(healthRequest, @@ -84,7 +83,7 @@ public class CorsSampleActuatorApplicationTests { @Test public void preflightRequestWhenCorsConfigInvalidShouldReturnForbidden() throws Exception { - RequestEntity entity = RequestEntity.options(new URI("/application/env")) + RequestEntity entity = RequestEntity.options(new URI("/actuator/env")) .header("Origin", "http://localhost:9095") .header("Access-Control-Request-Method", "GET").build(); ResponseEntity exchange = this.testRestTemplate.exchange(entity, diff --git a/spring-boot-samples/spring-boot-sample-actuator-custom-security/src/test/java/sample/actuator/customsecurity/ManagementPortAndPathSampleActuatorApplicationTests.java b/spring-boot-samples/spring-boot-sample-actuator-custom-security/src/test/java/sample/actuator/customsecurity/ManagementPortAndPathSampleActuatorApplicationTests.java index 1e5e39792b8..d561c3c69aa 100644 --- a/spring-boot-samples/spring-boot-sample-actuator-custom-security/src/test/java/sample/actuator/customsecurity/ManagementPortAndPathSampleActuatorApplicationTests.java +++ b/spring-boot-samples/spring-boot-sample-actuator-custom-security/src/test/java/sample/actuator/customsecurity/ManagementPortAndPathSampleActuatorApplicationTests.java @@ -58,16 +58,16 @@ public class ManagementPortAndPathSampleActuatorApplicationTests { @Test public void testSecureActuator() throws Exception { ResponseEntity entity = new TestRestTemplate().getForEntity( - "http://localhost:" + this.managementPort + "/management/application/env", + "http://localhost:" + this.managementPort + "/management/actuator/env", String.class); assertThat(entity.getStatusCode()).isEqualTo(HttpStatus.UNAUTHORIZED); } @Test public void testInsecureActuator() throws Exception { - ResponseEntity entity = new TestRestTemplate() - .getForEntity("http://localhost:" + this.managementPort - + "/management/application/health", String.class); + ResponseEntity entity = new TestRestTemplate().getForEntity( + "http://localhost:" + this.managementPort + "/management/actuator/health", + String.class); assertThat(entity.getStatusCode()).isEqualTo(HttpStatus.OK); assertThat(entity.getBody()).contains("\"status\":\"UP\""); } @@ -76,7 +76,7 @@ public class ManagementPortAndPathSampleActuatorApplicationTests { public void testMissing() throws Exception { ResponseEntity entity = new TestRestTemplate("admin", "admin") .getForEntity("http://localhost:" + this.managementPort - + "/management/application/missing", String.class); + + "/management/actuator/missing", String.class); assertThat(entity.getStatusCode()).isEqualTo(HttpStatus.NOT_FOUND); assertThat(entity.getBody()).contains("\"status\":404"); } diff --git a/spring-boot-samples/spring-boot-sample-actuator-custom-security/src/test/java/sample/actuator/customsecurity/SampleActuatorCustomSecurityApplicationTests.java b/spring-boot-samples/spring-boot-sample-actuator-custom-security/src/test/java/sample/actuator/customsecurity/SampleActuatorCustomSecurityApplicationTests.java index 25260a00844..8d9272349e0 100644 --- a/spring-boot-samples/spring-boot-sample-actuator-custom-security/src/test/java/sample/actuator/customsecurity/SampleActuatorCustomSecurityApplicationTests.java +++ b/spring-boot-samples/spring-boot-sample-actuator-custom-security/src/test/java/sample/actuator/customsecurity/SampleActuatorCustomSecurityApplicationTests.java @@ -72,8 +72,8 @@ public class SampleActuatorCustomSecurityApplicationTests { @Test public void insecureActuator() throws Exception { - ResponseEntity entity = this.restTemplate - .getForEntity("/application/health", String.class); + ResponseEntity entity = this.restTemplate.getForEntity("/actuator/health", + String.class); assertThat(entity.getStatusCode()).isEqualTo(HttpStatus.OK); assertThat(entity.getBody()).contains("\"status\":\"UP\""); } @@ -81,7 +81,7 @@ public class SampleActuatorCustomSecurityApplicationTests { @Test public void secureActuator() throws Exception { @SuppressWarnings("rawtypes") - ResponseEntity entity = this.restTemplate.getForEntity("/application/env", + ResponseEntity entity = this.restTemplate.getForEntity("/actuator/env", Map.class); assertThat(entity.getStatusCode()).isEqualTo(HttpStatus.UNAUTHORIZED); } diff --git a/spring-boot-samples/spring-boot-sample-actuator-log4j2/src/test/java/sample/actuator/log4j2/SampleActuatorLog4J2ApplicationTests.java b/spring-boot-samples/spring-boot-sample-actuator-log4j2/src/test/java/sample/actuator/log4j2/SampleActuatorLog4J2ApplicationTests.java index 87e7d92febf..d39c95f1d0b 100644 --- a/spring-boot-samples/spring-boot-sample-actuator-log4j2/src/test/java/sample/actuator/log4j2/SampleActuatorLog4J2ApplicationTests.java +++ b/spring-boot-samples/spring-boot-sample-actuator-log4j2/src/test/java/sample/actuator/log4j2/SampleActuatorLog4J2ApplicationTests.java @@ -66,7 +66,7 @@ public class SampleActuatorLog4J2ApplicationTests { @Test public void validateLoggersEndpoint() throws Exception { this.mvc.perform( - get("/application/loggers/org.apache.coyote.http11.Http11NioProtocol") + get("/actuator/loggers/org.apache.coyote.http11.Http11NioProtocol") .header("Authorization", "Basic " + getBasicAuth())) .andExpect(status().isOk()) .andExpect(content().string(equalTo("{\"configuredLevel\":\"WARN\"," diff --git a/spring-boot-samples/spring-boot-sample-actuator-ui/src/test/java/sample/actuator/ui/SampleActuatorUiApplicationPortTests.java b/spring-boot-samples/spring-boot-sample-actuator-ui/src/test/java/sample/actuator/ui/SampleActuatorUiApplicationPortTests.java index 9e298a5934d..8b18a870878 100644 --- a/spring-boot-samples/spring-boot-sample-actuator-ui/src/test/java/sample/actuator/ui/SampleActuatorUiApplicationPortTests.java +++ b/spring-boot-samples/spring-boot-sample-actuator-ui/src/test/java/sample/actuator/ui/SampleActuatorUiApplicationPortTests.java @@ -59,7 +59,7 @@ public class SampleActuatorUiApplicationPortTests { public void testMetrics() throws Exception { @SuppressWarnings("rawtypes") ResponseEntity entity = new TestRestTemplate().getForEntity( - "http://localhost:" + this.managementPort + "/application/metrics", + "http://localhost:" + this.managementPort + "/actuator/metrics", Map.class); assertThat(entity.getStatusCode()).isEqualTo(HttpStatus.UNAUTHORIZED); } @@ -68,7 +68,7 @@ public class SampleActuatorUiApplicationPortTests { public void testHealth() throws Exception { ResponseEntity entity = new TestRestTemplate() .withBasicAuth("user", getPassword()).getForEntity( - "http://localhost:" + this.managementPort + "/application/health", + "http://localhost:" + this.managementPort + "/actuator/health", String.class); assertThat(entity.getStatusCode()).isEqualTo(HttpStatus.OK); assertThat(entity.getBody()).contains("\"status\":\"UP\""); diff --git a/spring-boot-samples/spring-boot-sample-actuator-ui/src/test/java/sample/actuator/ui/SampleActuatorUiApplicationTests.java b/spring-boot-samples/spring-boot-sample-actuator-ui/src/test/java/sample/actuator/ui/SampleActuatorUiApplicationTests.java index ae35bca69ac..2a66fd0196f 100644 --- a/spring-boot-samples/spring-boot-sample-actuator-ui/src/test/java/sample/actuator/ui/SampleActuatorUiApplicationTests.java +++ b/spring-boot-samples/spring-boot-sample-actuator-ui/src/test/java/sample/actuator/ui/SampleActuatorUiApplicationTests.java @@ -70,8 +70,8 @@ public class SampleActuatorUiApplicationTests { @Test public void testMetrics() throws Exception { @SuppressWarnings("rawtypes") - ResponseEntity entity = this.restTemplate - .getForEntity("/application/metrics", Map.class); + ResponseEntity entity = this.restTemplate.getForEntity("/actuator/metrics", + Map.class); assertThat(entity.getStatusCode()).isEqualTo(HttpStatus.UNAUTHORIZED); } 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 188201908b5..4a9dfa0426a 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 @@ -61,8 +61,7 @@ public class ManagementAddressActuatorApplicationTests { public void testHealth() throws Exception { ResponseEntity entity = new TestRestTemplate() .withBasicAuth("user", getPassword()).getForEntity("http://localhost:" - + this.managementPort + "/admin/application/health", - String.class); + + this.managementPort + "/admin/actuator/health", String.class); assertThat(entity.getStatusCode()).isEqualTo(HttpStatus.OK); assertThat(entity.getBody()).contains("\"status\":\"UP\""); } diff --git a/spring-boot-samples/spring-boot-sample-actuator/src/test/java/sample/actuator/ManagementPortSampleActuatorApplicationTests.java b/spring-boot-samples/spring-boot-sample-actuator/src/test/java/sample/actuator/ManagementPortSampleActuatorApplicationTests.java index 4c51480ce38..9fa396589ae 100644 --- a/spring-boot-samples/spring-boot-sample-actuator/src/test/java/sample/actuator/ManagementPortSampleActuatorApplicationTests.java +++ b/spring-boot-samples/spring-boot-sample-actuator/src/test/java/sample/actuator/ManagementPortSampleActuatorApplicationTests.java @@ -64,7 +64,7 @@ public class ManagementPortSampleActuatorApplicationTests { testHome(); // makes sure some requests have been made @SuppressWarnings("rawtypes") ResponseEntity entity = new TestRestTemplate().getForEntity( - "http://localhost:" + this.managementPort + "/application/metrics", + "http://localhost:" + this.managementPort + "/actuator/metrics", Map.class); assertThat(entity.getStatusCode()).isEqualTo(HttpStatus.UNAUTHORIZED); } @@ -73,7 +73,7 @@ public class ManagementPortSampleActuatorApplicationTests { public void testHealth() throws Exception { ResponseEntity entity = new TestRestTemplate() .withBasicAuth("user", getPassword()).getForEntity( - "http://localhost:" + this.managementPort + "/application/health", + "http://localhost:" + this.managementPort + "/actuator/health", String.class); assertThat(entity.getStatusCode()).isEqualTo(HttpStatus.OK); assertThat(entity.getBody()).contains("\"status\":\"UP\""); diff --git a/spring-boot-samples/spring-boot-sample-actuator/src/test/java/sample/actuator/SampleActuatorApplicationTests.java b/spring-boot-samples/spring-boot-sample-actuator/src/test/java/sample/actuator/SampleActuatorApplicationTests.java index b4e3479288f..e082c11277c 100644 --- a/spring-boot-samples/spring-boot-sample-actuator/src/test/java/sample/actuator/SampleActuatorApplicationTests.java +++ b/spring-boot-samples/spring-boot-sample-actuator/src/test/java/sample/actuator/SampleActuatorApplicationTests.java @@ -94,7 +94,7 @@ public class SampleActuatorApplicationTests { @SuppressWarnings("rawtypes") ResponseEntity entity = this.restTemplate .withBasicAuth("user", getPassword()) - .getForEntity("/application/metrics", Map.class); + .getForEntity("/actuator/metrics", Map.class); assertThat(entity.getStatusCode()).isEqualTo(HttpStatus.OK); Map body = entity.getBody(); assertThat(body).containsKey("names"); @@ -107,7 +107,7 @@ public class SampleActuatorApplicationTests { @SuppressWarnings("rawtypes") ResponseEntity entity = this.restTemplate .withBasicAuth("user", getPassword()) - .getForEntity("/application/env", Map.class); + .getForEntity("/actuator/env", Map.class); assertThat(entity.getStatusCode()).isEqualTo(HttpStatus.OK); @SuppressWarnings("unchecked") Map body = entity.getBody(); @@ -118,7 +118,7 @@ public class SampleActuatorApplicationTests { public void testHealth() throws Exception { ResponseEntity entity = this.restTemplate .withBasicAuth("user", getPassword()) - .getForEntity("/application/health", String.class); + .getForEntity("/actuator/health", String.class); assertThat(entity.getStatusCode()).isEqualTo(HttpStatus.OK); assertThat(entity.getBody()).contains("\"status\":\"UP\""); assertThat(entity.getBody()).doesNotContain("\"hello\":\"1\""); @@ -128,7 +128,7 @@ public class SampleActuatorApplicationTests { public void testInfo() throws Exception { ResponseEntity entity = this.restTemplate .withBasicAuth("user", getPassword()) - .getForEntity("/application/info", String.class); + .getForEntity("/actuator/info", String.class); assertThat(entity.getStatusCode()).isEqualTo(HttpStatus.OK); assertThat(entity.getBody()) .contains("\"artifact\":\"spring-boot-sample-actuator\""); @@ -169,7 +169,7 @@ public class SampleActuatorApplicationTests { @SuppressWarnings("rawtypes") ResponseEntity entity = this.restTemplate .withBasicAuth("user", getPassword()) - .getForEntity("/application/trace", Map.class); + .getForEntity("/actuator/trace", Map.class); assertThat(entity.getStatusCode()).isEqualTo(HttpStatus.OK); Map body = entity.getBody(); Map trace = ((List>) body.get("traces")) @@ -183,11 +183,11 @@ public class SampleActuatorApplicationTests { @SuppressWarnings("unchecked") public void traceWithParameterMap() throws Exception { this.restTemplate.withBasicAuth("user", getPassword()) - .getForEntity("/application/health?param1=value1", String.class); + .getForEntity("/actuator/health?param1=value1", String.class); @SuppressWarnings("rawtypes") ResponseEntity entity = this.restTemplate .withBasicAuth("user", getPassword()) - .getForEntity("/application/trace", Map.class); + .getForEntity("/actuator/trace", Map.class); assertThat(entity.getStatusCode()).isEqualTo(HttpStatus.OK); Map body = entity.getBody(); Map trace = ((List>) body.get("traces")) @@ -215,7 +215,7 @@ public class SampleActuatorApplicationTests { @SuppressWarnings("rawtypes") ResponseEntity entity = this.restTemplate .withBasicAuth("user", getPassword()) - .getForEntity("/application/beans", Map.class); + .getForEntity("/actuator/beans", Map.class); assertThat(entity.getStatusCode()).isEqualTo(HttpStatus.OK); assertThat(entity.getBody()).containsOnlyKeys("beans", "parent", "contextId"); assertThat(((String) entity.getBody().get("contextId"))) @@ -228,7 +228,7 @@ public class SampleActuatorApplicationTests { @SuppressWarnings("rawtypes") ResponseEntity entity = this.restTemplate .withBasicAuth("user", getPassword()) - .getForEntity("/application/configprops", Map.class); + .getForEntity("/actuator/configprops", Map.class); assertThat(entity.getStatusCode()).isEqualTo(HttpStatus.OK); Map body = entity.getBody(); assertThat((Map) body.get("beans")) diff --git a/spring-boot-samples/spring-boot-sample-actuator/src/test/java/sample/actuator/ServletPathSampleActuatorApplicationTests.java b/spring-boot-samples/spring-boot-sample-actuator/src/test/java/sample/actuator/ServletPathSampleActuatorApplicationTests.java index 2819270c9bd..5be3affe8ac 100644 --- a/spring-boot-samples/spring-boot-sample-actuator/src/test/java/sample/actuator/ServletPathSampleActuatorApplicationTests.java +++ b/spring-boot-samples/spring-boot-sample-actuator/src/test/java/sample/actuator/ServletPathSampleActuatorApplicationTests.java @@ -61,7 +61,7 @@ public class ServletPathSampleActuatorApplicationTests { public void testHealth() throws Exception { ResponseEntity entity = this.restTemplate .withBasicAuth("user", getPassword()) - .getForEntity("/spring/application/health", String.class); + .getForEntity("/spring/actuator/health", String.class); assertThat(entity.getStatusCode()).isEqualTo(HttpStatus.OK); assertThat(entity.getBody()).contains("\"status\":\"UP\""); } diff --git a/spring-boot-samples/spring-boot-sample-actuator/src/test/java/sample/actuator/ShutdownSampleActuatorApplicationTests.java b/spring-boot-samples/spring-boot-sample-actuator/src/test/java/sample/actuator/ShutdownSampleActuatorApplicationTests.java index a4de4c67075..3f2a1d26c40 100644 --- a/spring-boot-samples/spring-boot-sample-actuator/src/test/java/sample/actuator/ShutdownSampleActuatorApplicationTests.java +++ b/spring-boot-samples/spring-boot-sample-actuator/src/test/java/sample/actuator/ShutdownSampleActuatorApplicationTests.java @@ -61,7 +61,7 @@ public class ShutdownSampleActuatorApplicationTests { @SuppressWarnings("rawtypes") ResponseEntity entity = this.restTemplate .withBasicAuth("user", getPassword()) - .postForEntity("/application/shutdown", null, Map.class); + .postForEntity("/actuator/shutdown", null, Map.class); assertThat(entity.getStatusCode()).isEqualTo(HttpStatus.OK); @SuppressWarnings("unchecked") Map body = entity.getBody(); diff --git a/spring-boot-samples/spring-boot-sample-flyway/README.adoc b/spring-boot-samples/spring-boot-sample-flyway/README.adoc index cd6d1c00086..1c3559a3f1d 100644 --- a/spring-boot-samples/spring-boot-sample-flyway/README.adoc +++ b/spring-boot-samples/spring-boot-sample-flyway/README.adoc @@ -2,7 +2,7 @@ This sample demonstrates the flyway auto-configuration support. -You can look at `http://localhost:8080/application/flyway` to review the list of scripts. +You can look at `http://localhost:8080/actuator/flyway` to review the list of scripts. This sample also enables the H2 console (at `http://localhost:8080/h2-console`) so that you can review the state of the database (the default jdbc url is diff --git a/spring-boot-samples/spring-boot-sample-jersey/src/test/java/sample/jersey/SampleJerseyApplicationTests.java b/spring-boot-samples/spring-boot-sample-jersey/src/test/java/sample/jersey/SampleJerseyApplicationTests.java index 96797fd9fae..816e8afc8a9 100644 --- a/spring-boot-samples/spring-boot-sample-jersey/src/test/java/sample/jersey/SampleJerseyApplicationTests.java +++ b/spring-boot-samples/spring-boot-sample-jersey/src/test/java/sample/jersey/SampleJerseyApplicationTests.java @@ -60,8 +60,8 @@ public class SampleJerseyApplicationTests { @Test public void actuatorStatus() { - ResponseEntity entity = this.restTemplate - .getForEntity("/application/health", String.class); + ResponseEntity entity = this.restTemplate.getForEntity("/actuator/health", + String.class); assertThat(entity.getStatusCode()).isEqualTo(HttpStatus.OK); assertThat(entity.getBody()).isEqualTo("{\"status\":\"UP\"}"); } diff --git a/spring-boot-samples/spring-boot-sample-liquibase/README.adoc b/spring-boot-samples/spring-boot-sample-liquibase/README.adoc index 855c5d74453..23b5fbc074c 100644 --- a/spring-boot-samples/spring-boot-sample-liquibase/README.adoc +++ b/spring-boot-samples/spring-boot-sample-liquibase/README.adoc @@ -2,7 +2,7 @@ This sample demonstrates the liquibase auto-configuration support. -You can look at `http://localhost:8080/application/liquibase` to review the list of +You can look at `http://localhost:8080/actuator/liquibase` to review the list of scripts. This sample also enables the H2 console (at `http://localhost:8080/h2-console`) diff --git a/spring-boot-samples/spring-boot-sample-secure-webflux/src/test/java/sample/secure/webflux/SampleSecureWebFluxApplicationTests.java b/spring-boot-samples/spring-boot-sample-secure-webflux/src/test/java/sample/secure/webflux/SampleSecureWebFluxApplicationTests.java index d86a7fa4785..b2846ae372b 100644 --- a/spring-boot-samples/spring-boot-sample-secure-webflux/src/test/java/sample/secure/webflux/SampleSecureWebFluxApplicationTests.java +++ b/spring-boot-samples/spring-boot-sample-secure-webflux/src/test/java/sample/secure/webflux/SampleSecureWebFluxApplicationTests.java @@ -48,7 +48,7 @@ public class SampleSecureWebFluxApplicationTests { @Test public void actuatorsSecureByDefault() { - this.webClient.get().uri("/application/health").accept(MediaType.APPLICATION_JSON) + this.webClient.get().uri("/actuator/health").accept(MediaType.APPLICATION_JSON) .exchange().expectStatus().isUnauthorized(); } @@ -61,7 +61,7 @@ public class SampleSecureWebFluxApplicationTests { @Test public void actuatorsAccessibleOnLogin() { - this.webClient.get().uri("/application/health").accept(MediaType.APPLICATION_JSON) + this.webClient.get().uri("/actuator/health").accept(MediaType.APPLICATION_JSON) .header("Authorization", "basic " + getBasicAuth()).exchange() .expectBody(String.class).isEqualTo("{\"status\":\"UP\"}"); } diff --git a/spring-boot-samples/spring-boot-sample-web-method-security/src/test/java/sample/security/method/SampleMethodSecurityApplicationTests.java b/spring-boot-samples/spring-boot-sample-web-method-security/src/test/java/sample/security/method/SampleMethodSecurityApplicationTests.java index 7cf7793b07f..be7cdc66fbf 100644 --- a/spring-boot-samples/spring-boot-sample-web-method-security/src/test/java/sample/security/method/SampleMethodSecurityApplicationTests.java +++ b/spring-boot-samples/spring-boot-sample-web-method-security/src/test/java/sample/security/method/SampleMethodSecurityApplicationTests.java @@ -105,7 +105,7 @@ public class SampleMethodSecurityApplicationTests { public void testManagementProtected() throws Exception { HttpHeaders headers = new HttpHeaders(); headers.setAccept(Arrays.asList(MediaType.APPLICATION_JSON)); - ResponseEntity entity = this.restTemplate.exchange("/application/beans", + ResponseEntity entity = this.restTemplate.exchange("/actuator/beans", HttpMethod.GET, new HttpEntity(headers), String.class); assertThat(entity.getStatusCode()).isEqualTo(HttpStatus.UNAUTHORIZED); } @@ -117,7 +117,7 @@ public class SampleMethodSecurityApplicationTests { this.restTemplate.getRestTemplate().getInterceptors().add(basicAuthInterceptor); try { ResponseEntity entity = this.restTemplate - .getForEntity("/application/beans", String.class); + .getForEntity("/actuator/beans", String.class); assertThat(entity.getStatusCode()).isEqualTo(HttpStatus.OK); } finally { diff --git a/spring-boot-samples/spring-boot-sample-webflux/src/test/java/sample/webflux/SampleWebFluxApplicationTests.java b/spring-boot-samples/spring-boot-sample-webflux/src/test/java/sample/webflux/SampleWebFluxApplicationTests.java index 7fcb6f696b9..e903de7ce8e 100644 --- a/spring-boot-samples/spring-boot-sample-webflux/src/test/java/sample/webflux/SampleWebFluxApplicationTests.java +++ b/spring-boot-samples/spring-boot-sample-webflux/src/test/java/sample/webflux/SampleWebFluxApplicationTests.java @@ -55,7 +55,7 @@ public class SampleWebFluxApplicationTests { @Test public void testActuatorStatus() { - this.webClient.get().uri("/application/health").accept(MediaType.APPLICATION_JSON) + this.webClient.get().uri("/actuator/health").accept(MediaType.APPLICATION_JSON) .exchange().expectStatus().isOk().expectBody() .json("{\"status\":\"UP\"}"); }