Move `/application` to `/actuator`

Change the endpoint default path from `/application` to `/actuator`.

Fixes gh-10970
pull/11117/merge
Phillip Webb 7 years ago
parent 3e2ede51d6
commit 07f71e889e

@ -8,7 +8,7 @@ The `auditevents` endpoint provides information about the application's audit ev
[[audit-events-retrieving]] [[audit-events-retrieving]]
== Retrieving Audit Events == 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: in the following curl-based example:
include::{snippets}auditevents/filtered/curl-request.adoc[] include::{snippets}auditevents/filtered/curl-request.adoc[]

@ -8,7 +8,7 @@ The `beans` endpoint provides information about the application's beans.
[[beans-retrieving]] [[beans-retrieving]]
== Retrieving the Beans == 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: following curl-based example:
include::{snippets}beans/curl-request.adoc[] include::{snippets}beans/curl-request.adoc[]

@ -9,7 +9,7 @@ configuration and auto-configuration classes.
[[conditions-retrieving]] [[conditions-retrieving]]
== Retrieving the Report == 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: the following curl-based example:
include::{snippets}conditions/curl-request.adoc[] include::{snippets}conditions/curl-request.adoc[]

@ -10,7 +10,7 @@ The `configprops` endpoint provides information about the application's
== Retrieving the `@ConfigurationProperties` Bean == Retrieving the `@ConfigurationProperties` Bean
To retrieve the `@ConfigurationProperties` beans, make a `GET` request to 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[] include::{snippets}configprops/curl-request.adoc[]

@ -8,7 +8,7 @@ The `env` endpoint provides information about the application's `Environment`.
[[env-entire]] [[env-entire]]
== Retrieving the Entire Environment == 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: the following curl-based example:
include::{snippets}env/all/curl-request.adoc[] include::{snippets}env/all/curl-request.adoc[]
@ -33,7 +33,7 @@ include::{snippets}env/all/response-fields.adoc[]
[[env-single-property]] [[env-single-property]]
== Retrieving a 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: as shown in the following curl-based example:
include::{snippets}env/single/curl-request.adoc[] include::{snippets}env/single/curl-request.adoc[]

@ -8,7 +8,7 @@ The `flyway` endpoint provides information about database migrations performed b
[[flyway-retrieving]] [[flyway-retrieving]]
== Retrieving the Migrations == 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: following curl-based example:
include::{snippets}flyway/curl-request.adoc[] include::{snippets}flyway/curl-request.adoc[]

@ -8,7 +8,7 @@ The `health` endpoint provides detailed information about the health of the appl
[[health-retrieving]] [[health-retrieving]]
== Retrieving the Health == 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: as shown in the following curl-based example:
include::{snippets}health/curl-request.adoc[] include::{snippets}health/curl-request.adoc[]

@ -8,7 +8,7 @@ The `heapdump` endpoint provides a heap dump from the application's JVM.
[[heapdump-retrieving]] [[heapdump-retrieving]]
== Retrieving the Heap Dump == 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[ 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 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, subsequent analysis. When using curl, this can be achieved by using the `-O` option,

@ -9,7 +9,7 @@ The `info` endpoint provides general information about the application.
== Retrieving the Info == Retrieving the Info
To retrieve the information about the application, make a `GET` request to 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[] include::{snippets}info/curl-request.adoc[]

@ -9,7 +9,7 @@ Liquibase.
[[liquibase-retrieving]] [[liquibase-retrieving]]
== Retrieving the Changes == 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: following curl-based example:
include::{snippets}liquibase/curl-request.adoc[] include::{snippets}liquibase/curl-request.adoc[]

@ -8,7 +8,7 @@ The `logfile` endpoint provides access to the contents of the application's log
[[logfile-retrieving]] [[logfile-retrieving]]
== Retrieving the Log File == 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: following curl-based example:
include::{snippets}logfile/entire/curl-request.adoc[] 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. 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: the `Range` header, as shown in the following curl-based example:
include::{snippets}logfile/range/curl-request.adoc[] include::{snippets}logfile/range/curl-request.adoc[]

@ -9,7 +9,7 @@ of their levels.
[[loggers-all]] [[loggers-all]]
== Retrieving All Loggers == 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: shown in the following curl-based example:
include::{snippets}loggers/all/curl-request.adoc[] include::{snippets}loggers/all/curl-request.adoc[]
@ -34,7 +34,7 @@ include::{snippets}loggers/all/response-fields.adoc[]
[[loggers-single]] [[loggers-single]]
== Retrieving a Single Logger == 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: as shown in the following curl-based example:
include::{snippets}loggers/single/curl-request.adoc[] include::{snippets}loggers/single/curl-request.adoc[]
@ -61,7 +61,7 @@ include::{snippets}loggers/single/response-fields.adoc[]
== Setting a Log Level == Setting a Log Level
To set the level of a logger, make a `POST` request to 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: for the logger, as shown in the following curl-based example:
include::{snippets}loggers/set/curl-request.adoc[] include::{snippets}loggers/set/curl-request.adoc[]
@ -85,7 +85,7 @@ include::{snippets}loggers/set/request-fields.adoc[]
== Clearing a Log Level == Clearing a Log Level
To clear the level of a logger, make a `POST` request to 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: in the following curl-based example:
include::{snippets}loggers/clear/curl-request.adoc[] include::{snippets}loggers/clear/curl-request.adoc[]

@ -9,7 +9,7 @@ The `metrics` endpoint provides access to application metrics.
== Retrieving Metric Names == Retrieving Metric Names
To retrieve the names of the available metrics, make a `GET` request to 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[] include::{snippets}metrics/names/curl-request.adoc[]
@ -33,7 +33,7 @@ include::{snippets}metrics/names/response-fields.adoc[]
[[metrics-retrieving-metric]] [[metrics-retrieving-metric]]
== Retrieving a 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: shown in the following curl-based example:
include::{snippets}metrics/metric/curl-request.adoc[] include::{snippets}metrics/metric/curl-request.adoc[]
@ -68,7 +68,7 @@ include::{snippets}metrics/metric/response-fields.adoc[]
[[metrics-drilling-down]] [[metrics-drilling-down]]
== 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: using the `tag` query parameter, as shown in the following curl-based example:
include::{snippets}metrics/metric-with-tags/curl-request.adoc[] include::{snippets}metrics/metric-with-tags/curl-request.adoc[]

@ -9,7 +9,7 @@ required for scraping by a Prometheus server.
[[prometheus-retrieving]] [[prometheus-retrieving]]
== Retrieving the Metrics == 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: the following curl-based example:
include::{snippets}prometheus/curl-request.adoc[] include::{snippets}prometheus/curl-request.adoc[]

@ -9,7 +9,7 @@ tasks.
[[scheduled-tasks-retrieving]] [[scheduled-tasks-retrieving]]
== Retrieving the Scheduled Tasks == 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: as shown in the following curl-based example:
include::{snippets}scheduled-tasks/curl-request.adoc[] include::{snippets}scheduled-tasks/curl-request.adoc[]

@ -9,7 +9,7 @@ are managed by Spring Session.
[[sessions-retrieving]] [[sessions-retrieving]]
== Retrieving Sessions == 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: following curl-based example:
include::{snippets}sessions/username/curl-request.adoc[] include::{snippets}sessions/username/curl-request.adoc[]
@ -48,7 +48,7 @@ include::{snippets}sessions/username/response-fields.adoc[]
[[sessions-retrieving-id]] [[sessions-retrieving-id]]
== Retrieving a Single Session == 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: shown in the following curl-based example:
include::{snippets}sessions/id/curl-request.adoc[] include::{snippets}sessions/id/curl-request.adoc[]
@ -75,7 +75,7 @@ include::{snippets}sessions/id/response-fields.adoc[]
[[sessions-deleting]] [[sessions-deleting]]
== Deleting a Session == 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: the following curl-based example:
include::{snippets}sessions/delete/curl-request.adoc[] include::{snippets}sessions/delete/curl-request.adoc[]

@ -8,7 +8,7 @@ The `shutdown` endpoint is used to shut down the application.
[[shutdown-shutting-down]] [[shutdown-shutting-down]]
== Shutting Down the Application == 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: in the following curl-based example:
include::{snippets}shutdown/curl-request.adoc[] include::{snippets}shutdown/curl-request.adoc[]

@ -8,7 +8,7 @@ The `threaddump` endpoint provides a thread dump from the application's JVM.
[[threaddump-retrieving]] [[threaddump-retrieving]]
== Retrieving the Thread Dump == 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: in the following curl-based example:
include::{snippets}threaddump/curl-request.adoc[] include::{snippets}threaddump/curl-request.adoc[]

@ -25,8 +25,8 @@ Before you proceed, you should read the following topics:
[[overview-endpoint-urls]] [[overview-endpoint-urls]]
=== URLs === URLs
By default, all web endpoints are available beneath the path `/application` with URLs of By default, all web endpoints are available beneath the path `/actuator` with URLs of
the form `/application/{id}`. The `/application` base path can be configured by using the 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: `management.endpoints.web.base-path` property, as shown in the following example:
[source,properties,indent=0] [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 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`. `/manage/info`.

@ -38,7 +38,7 @@ public class WebEndpointProperties {
* Base path for Web endpoints. Relative to server.context-path or * Base path for Web endpoints. Relative to server.context-path or
* management.server.context-path if management.server.port is configured. * 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. * Endpoint IDs that should be exposed or '*' for all.

@ -56,9 +56,8 @@ public class DefaultEndpointPathProviderTests {
@Test @Test
public void getPathsWhenHasContextPathShouldReturnAllPathsWithContext() public void getPathsWhenHasContextPathShouldReturnAllPathsWithContext()
throws Exception { throws Exception {
DefaultEndpointPathProvider provider = createProvider("/application"); DefaultEndpointPathProvider provider = createProvider("/actuator");
assertThat(provider.getPaths()).containsOnly("/application/foo", assertThat(provider.getPaths()).containsOnly("/actuator/foo", "/actuator/bar");
"/application/bar");
} }
@Test @Test
@ -75,8 +74,8 @@ public class DefaultEndpointPathProviderTests {
@Test @Test
public void getPathWhenHasContextPathReturnPath() throws Exception { public void getPathWhenHasContextPathReturnPath() throws Exception {
DefaultEndpointPathProvider provider = createProvider("/application"); DefaultEndpointPathProvider provider = createProvider("/actuator");
assertThat(provider.getPath("foo")).isEqualTo("/application/foo"); assertThat(provider.getPath("foo")).isEqualTo("/actuator/foo");
} }
private DefaultEndpointPathProvider createProvider(String contextPath) { private DefaultEndpointPathProvider createProvider(String contextPath) {

@ -30,7 +30,7 @@ public class WebEndpointPropertiesTests {
@Test @Test
public void defaultBasePathShouldBeApplication() throws Exception { public void defaultBasePathShouldBeApplication() throws Exception {
WebEndpointProperties properties = new WebEndpointProperties(); WebEndpointProperties properties = new WebEndpointProperties();
assertThat(properties.getBasePath()).isEqualTo("/application"); assertThat(properties.getBasePath()).isEqualTo("/actuator");
} }
@Test @Test

@ -60,8 +60,7 @@ public class AuditEventsEndpointDocumentationTests
String queryTimestamp = "2017-11-07T09:37Z"; String queryTimestamp = "2017-11-07T09:37Z";
given(this.repository.find(any(), any(), any())).willReturn( given(this.repository.find(any(), any(), any())).willReturn(
Arrays.asList(new AuditEvent("alice", "logout", Collections.emptyMap()))); Arrays.asList(new AuditEvent("alice", "logout", Collections.emptyMap())));
this.mockMvc this.mockMvc.perform(get("/actuator/auditevents").param("after", queryTimestamp))
.perform(get("/application/auditevents").param("after", queryTimestamp))
.andExpect(status().isOk()) .andExpect(status().isOk())
.andDo(document("auditevents/after", responseFields( .andDo(document("auditevents/after", responseFields(
fieldWithPath("events").description("An array of audit events."), fieldWithPath("events").description("An array of audit events."),
@ -81,7 +80,7 @@ public class AuditEventsEndpointDocumentationTests
given(this.repository.find("alice", date, "logout")).willReturn( given(this.repository.find("alice", date, "logout")).willReturn(
Arrays.asList(new AuditEvent("alice", "logout", Collections.emptyMap()))); Arrays.asList(new AuditEvent("alice", "logout", Collections.emptyMap())));
this.mockMvc this.mockMvc
.perform(get("/application/auditevents").param("principal", "alice") .perform(get("/actuator/auditevents").param("principal", "alice")
.param("after", queryTimestamp).param("type", "logout")) .param("after", queryTimestamp).param("type", "logout"))
.andExpect(status().isOk()) .andExpect(status().isOk())
.andDo(document("auditevents/filtered", .andDo(document("auditevents/filtered",

@ -69,7 +69,7 @@ public class BeansEndpointDocumentationTests extends AbstractEndpointDocumentati
.description("Beans in the parent application " .description("Beans in the parent application "
+ "context, if any.") + "context, if any.")
.type(JsonFieldType.OBJECT).optional()); .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", .andDo(document("beans",
preprocessResponse(limit("beans", this::isIndependentBean)), preprocessResponse(limit("beans", this::isIndependentBean)),
responseFields)); responseFields));

@ -70,7 +70,7 @@ public class ConditionsReportEndpointDocumentationTests
@Test @Test
public void conditions() throws Exception { 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", .andDo(MockMvcRestDocumentation.document("conditions",
preprocessResponse(limit("positiveMatches"), preprocessResponse(limit("positiveMatches"),
limit("negativeMatches")), limit("negativeMatches")),

@ -43,7 +43,7 @@ public class ConfigurationPropertiesReportEndpointDocumentationTests
@Test @Test
public void configProps() throws Exception { 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", .andDo(MockMvcRestDocumentation.document("configprops",
preprocessResponse(limit("beans")), preprocessResponse(limit("beans")),
responseFields( responseFields(

@ -71,7 +71,7 @@ public class EnvironmentEndpointDocumentationTests
@Test @Test
public void env() throws Exception { 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", .andDo(document("env/all",
preprocessResponse(replacePattern( preprocessResponse(replacePattern(
Pattern.compile( Pattern.compile(
@ -91,7 +91,7 @@ public class EnvironmentEndpointDocumentationTests
@Test @Test
public void singlePropertyFromEnv() throws Exception { 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()) .andExpect(status().isOk())
.andDo(document("env/single", .andDo(document("env/single",
preprocessResponse(replacePattern( preprocessResponse(replacePattern(

@ -50,7 +50,7 @@ public class FlywayEndpointDocumentationTests extends AbstractEndpointDocumentat
@Test @Test
public void flyway() throws Exception { 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", .andDo(MockMvcRestDocumentation.document("flyway",
responseFields(fieldWithPath("*.migrations").description( responseFields(fieldWithPath("*.migrations").description(
"Migrations performed by the Flyway instance, keyed by" "Migrations performed by the Flyway instance, keyed by"

@ -51,7 +51,7 @@ public class HealthEndpointDocumentationTests extends AbstractEndpointDocumentat
@Test @Test
public void health() throws Exception { 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", .andDo(document("health",
responseFields( responseFields(
fieldWithPath("status").description( fieldWithPath("status").description(

@ -44,7 +44,7 @@ public class HeapDumpWebEndpointDocumentationTests
@Test @Test
public void heapDump() throws Exception { 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", .andDo(document("heapdump",
new CurlRequestSnippet(CliDocumentation.multiLineFormat()) { new CurlRequestSnippet(CliDocumentation.multiLineFormat()) {

@ -48,7 +48,7 @@ public class InfoEndpointDocumentationTests extends AbstractEndpointDocumentatio
@Test @Test
public void info() throws Exception { 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", .andDo(MockMvcRestDocumentation.document("info",
responseFields(beneathPath("git"), responseFields(beneathPath("git"),
fieldWithPath("branch") fieldWithPath("branch")

@ -48,7 +48,7 @@ public class LiquibaseEndpointDocumentationTests
@Test @Test
public void liquibase() throws Exception { 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", .andDo(MockMvcRestDocumentation.document("liquibase",
responseFields(fieldWithPath("*.changeSets").description( responseFields(fieldWithPath("*.changeSets").description(
"Change sets made by the Liquibase beans, keyed by " "Change sets made by the Liquibase beans, keyed by "

@ -40,13 +40,13 @@ public class LogFileWebEndpointDocumentationTests
@Test @Test
public void logFile() throws Exception { 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")); .andDo(MockMvcRestDocumentation.document("logfile/entire"));
} }
@Test @Test
public void logFileRange() throws Exception { 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()) .andExpect(status().isPartialContent())
.andDo(MockMvcRestDocumentation.document("logfile/range")); .andDo(MockMvcRestDocumentation.document("logfile/range"));
} }

@ -67,7 +67,7 @@ public class LoggersEndpointDocumentationTests
given(this.loggingSystem.getLoggerConfigurations()).willReturn(Arrays.asList( given(this.loggingSystem.getLoggerConfigurations()).willReturn(Arrays.asList(
new LoggerConfiguration("ROOT", LogLevel.INFO, LogLevel.INFO), new LoggerConfiguration("ROOT", LogLevel.INFO, LogLevel.INFO),
new LoggerConfiguration("com.example", LogLevel.DEBUG, LogLevel.DEBUG))); 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", .andDo(MockMvcRestDocumentation.document("loggers/all",
responseFields( responseFields(
fieldWithPath("levels").description( fieldWithPath("levels").description(
@ -80,7 +80,7 @@ public class LoggersEndpointDocumentationTests
public void logger() throws Exception { public void logger() throws Exception {
given(this.loggingSystem.getLoggerConfiguration("com.example")).willReturn( given(this.loggingSystem.getLoggerConfiguration("com.example")).willReturn(
new LoggerConfiguration("com.example", LogLevel.INFO, LogLevel.INFO)); 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 .andExpect(status().isOk()).andDo(MockMvcRestDocumentation
.document("loggers/single", responseFields(levelFields))); .document("loggers/single", responseFields(levelFields)));
} }
@ -88,7 +88,7 @@ public class LoggersEndpointDocumentationTests
@Test @Test
public void setLogLevel() throws Exception { public void setLogLevel() throws Exception {
this.mockMvc this.mockMvc
.perform(post("/application/loggers/com.example") .perform(post("/actuator/loggers/com.example")
.content("{\"configuredLevel\":\"debug\"}") .content("{\"configuredLevel\":\"debug\"}")
.contentType(MediaType.APPLICATION_JSON)) .contentType(MediaType.APPLICATION_JSON))
.andExpect(status().isNoContent()) .andExpect(status().isNoContent())
@ -104,7 +104,7 @@ public class LoggersEndpointDocumentationTests
@Test @Test
public void clearLogLevel() throws Exception { public void clearLogLevel() throws Exception {
this.mockMvc this.mockMvc
.perform(post("/application/loggers/com.example").content("{}") .perform(post("/actuator/loggers/com.example").content("{}")
.contentType(MediaType.APPLICATION_JSON)) .contentType(MediaType.APPLICATION_JSON))
.andExpect(status().isNoContent()) .andExpect(status().isNoContent())
.andDo(MockMvcRestDocumentation.document("loggers/clear")); .andDo(MockMvcRestDocumentation.document("loggers/clear"));

@ -44,14 +44,14 @@ public class MetricsEndpointDocumentationTests
@Test @Test
public void metricNames() throws Exception { 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") .andDo(document("metrics/names", responseFields(fieldWithPath("names")
.description("Names of the known metrics.")))); .description("Names of the known metrics."))));
} }
@Test @Test
public void metric() throws Exception { 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()) .andExpect(status().isOk())
.andDo(document("metrics/metric", .andDo(document("metrics/metric",
responseFields( responseFields(
@ -74,7 +74,7 @@ public class MetricsEndpointDocumentationTests
@Test @Test
public void metricWithTags() throws Exception { public void metricWithTags() throws Exception {
this.mockMvc this.mockMvc
.perform(get("/application/metrics/jvm.memory.max") .perform(get("/actuator/metrics/jvm.memory.max")
.param("tag", "area:nonheap") .param("tag", "area:nonheap")
.param("tag", "id:Compressed Class Space")) .param("tag", "id:Compressed Class Space"))
.andExpect(status().isOk()) .andExpect(status().isOk())

@ -42,7 +42,7 @@ public class PrometheusScrapeEndpointDocumentationTests
@Test @Test
public void prometheus() throws Exception { 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")); .andDo(document("prometheus"));
} }

@ -48,8 +48,7 @@ public class ScheduledTasksEndpointDocumentationTests
@Test @Test
public void scheduledTasks() throws Exception { public void scheduledTasks() throws Exception {
this.mockMvc.perform(get("/application/scheduledtasks")) this.mockMvc.perform(get("/actuator/scheduledtasks")).andExpect(status().isOk())
.andExpect(status().isOk())
.andDo(document("scheduled-tasks", .andDo(document("scheduled-tasks",
preprocessResponse(replacePattern( preprocessResponse(replacePattern(
Pattern.compile( Pattern.compile(

@ -92,7 +92,7 @@ public class SessionsEndpointDocumentationTests
given(this.sessionRepository.findByIndexNameAndIndexValue( given(this.sessionRepository.findByIndexNameAndIndexValue(
FindByIndexNameSessionRepository.PRINCIPAL_NAME_INDEX_NAME, "alice")) FindByIndexNameSessionRepository.PRINCIPAL_NAME_INDEX_NAME, "alice"))
.willReturn(sessions); .willReturn(sessions);
this.mockMvc.perform(get("/application/sessions").param("username", "alice")) this.mockMvc.perform(get("/actuator/sessions").param("username", "alice"))
.andExpect(status().isOk()) .andExpect(status().isOk())
.andDo(document("sessions/username", .andDo(document("sessions/username",
responseFields(fieldWithPath("sessions") responseFields(fieldWithPath("sessions")
@ -109,14 +109,14 @@ public class SessionsEndpointDocumentationTests
sessions.put(sessionTwo.getId(), sessionTwo); sessions.put(sessionTwo.getId(), sessionTwo);
sessions.put(sessionThree.getId(), sessionThree); sessions.put(sessionThree.getId(), sessionThree);
given(this.sessionRepository.findById(sessionTwo.getId())).willReturn(sessionTwo); 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()) .andExpect(status().isOk())
.andDo(document("sessions/id", responseFields(sessionFields))); .andDo(document("sessions/id", responseFields(sessionFields)));
} }
@Test @Test
public void deleteASession() throws Exception { 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")); .andExpect(status().isNoContent()).andDo(document("sessions/delete"));
verify(this.sessionRepository).deleteById(sessionTwo.getId()); verify(this.sessionRepository).deleteById(sessionTwo.getId());
} }

@ -43,7 +43,7 @@ public class ShutdownEndpointDocumentationTests
@Test @Test
public void shutdown() throws Exception { 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", .andDo(MockMvcRestDocumentation.document("shutdown",
responseFields(fieldWithPath("message").description( responseFields(fieldWithPath("message").description(
"Message describing the result of the request.")))); "Message describing the result of the request."))));

@ -42,7 +42,7 @@ public class ThreadDumpEndpointDocumentationTests
@Test @Test
public void threadDump() throws Exception { 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", .andDo(MockMvcRestDocumentation.document("threaddump",
preprocessResponse(limit("threads")), preprocessResponse(limit("threads")),
responseFields( responseFields(

@ -70,7 +70,7 @@ public class JolokiaManagementContextConfigurationIntegrationTests {
@Test @Test
public void jolokiaIsExposed() { public void jolokiaIsExposed() {
ResponseEntity<String> response = this.restTemplate ResponseEntity<String> response = this.restTemplate
.getForEntity("/application/jolokia", String.class); .getForEntity("/actuator/jolokia", String.class);
assertThat(HttpStatus.OK).isEqualTo(response.getStatusCode()); assertThat(HttpStatus.OK).isEqualTo(response.getStatusCode());
assertThat(response.getBody()).contains("\"agent\""); assertThat(response.getBody()).contains("\"agent\"");
assertThat(response.getBody()).contains("\"request\":{\"type\""); assertThat(response.getBody()).contains("\"request\":{\"type\"");
@ -79,7 +79,7 @@ public class JolokiaManagementContextConfigurationIntegrationTests {
@Test @Test
public void search() { public void search() {
ResponseEntity<String> response = this.restTemplate ResponseEntity<String> 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(HttpStatus.OK).isEqualTo(response.getStatusCode());
assertThat(response.getBody()).contains("GarbageCollector"); assertThat(response.getBody()).contains("GarbageCollector");
} }
@ -87,7 +87,7 @@ public class JolokiaManagementContextConfigurationIntegrationTests {
@Test @Test
public void read() { public void read() {
ResponseEntity<String> response = this.restTemplate.getForEntity( ResponseEntity<String> 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(HttpStatus.OK).isEqualTo(response.getStatusCode());
assertThat(response.getBody()).contains("NonHeapMemoryUsage"); assertThat(response.getBody()).contains("NonHeapMemoryUsage");
} }
@ -95,7 +95,7 @@ public class JolokiaManagementContextConfigurationIntegrationTests {
@Test @Test
public void list() { public void list() {
ResponseEntity<String> response = this.restTemplate.getForEntity( ResponseEntity<String> 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(HttpStatus.OK).isEqualTo(response.getStatusCode());
assertThat(response.getBody()).contains("NonHeapMemoryUsage"); assertThat(response.getBody()).contains("NonHeapMemoryUsage");
} }

@ -78,7 +78,7 @@ public class WebMvcEndpointCorsIntegrationTests {
MockMvc mockMvc = createMockMvc(); MockMvc mockMvc = createMockMvc();
System.out.println(new ConditionEvaluationReportMessage( System.out.println(new ConditionEvaluationReportMessage(
this.context.getBean(ConditionEvaluationReport.class))); 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(HttpHeaders.ACCESS_CONTROL_REQUEST_METHOD, "GET")).andExpect(
header().doesNotExist(HttpHeaders.ACCESS_CONTROL_ALLOW_ORIGIN)); header().doesNotExist(HttpHeaders.ACCESS_CONTROL_ALLOW_ORIGIN));
} }
@ -89,7 +89,7 @@ public class WebMvcEndpointCorsIntegrationTests {
.of("management.endpoints.web.cors.allowed-origins:foo.example.com") .of("management.endpoints.web.cors.allowed-origins:foo.example.com")
.applyTo(this.context); .applyTo(this.context);
createMockMvc() 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")) .header(HttpHeaders.ACCESS_CONTROL_REQUEST_METHOD, "GET"))
.andExpect(status().isForbidden()); .andExpect(status().isForbidden());
performAcceptedCorsRequest(); performAcceptedCorsRequest();
@ -120,7 +120,7 @@ public class WebMvcEndpointCorsIntegrationTests {
.of("management.endpoints.web.cors.allowed-origins:foo.example.com") .of("management.endpoints.web.cors.allowed-origins:foo.example.com")
.applyTo(this.context); .applyTo(this.context);
createMockMvc() 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_METHOD, "GET")
.header(HttpHeaders.ACCESS_CONTROL_REQUEST_HEADERS, "Alpha")) .header(HttpHeaders.ACCESS_CONTROL_REQUEST_HEADERS, "Alpha"))
.andExpect(status().isForbidden()); .andExpect(status().isForbidden());
@ -133,7 +133,7 @@ public class WebMvcEndpointCorsIntegrationTests {
"management.endpoints.web.cors.allowed-headers:Alpha,Bravo") "management.endpoints.web.cors.allowed-headers:Alpha,Bravo")
.applyTo(this.context); .applyTo(this.context);
createMockMvc() 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_METHOD, "GET")
.header(HttpHeaders.ACCESS_CONTROL_REQUEST_HEADERS, "Alpha")) .header(HttpHeaders.ACCESS_CONTROL_REQUEST_HEADERS, "Alpha"))
.andExpect(status().isOk()).andExpect(header() .andExpect(status().isOk()).andExpect(header()
@ -146,7 +146,7 @@ public class WebMvcEndpointCorsIntegrationTests {
.of("management.endpoints.web.cors.allowed-origins:foo.example.com") .of("management.endpoints.web.cors.allowed-origins:foo.example.com")
.applyTo(this.context); .applyTo(this.context);
createMockMvc() createMockMvc()
.perform(options("/application/health") .perform(options("/actuator/health")
.header(HttpHeaders.ORIGIN, "foo.example.com") .header(HttpHeaders.ORIGIN, "foo.example.com")
.header(HttpHeaders.ACCESS_CONTROL_REQUEST_METHOD, "PATCH")) .header(HttpHeaders.ACCESS_CONTROL_REQUEST_METHOD, "PATCH"))
.andExpect(status().isForbidden()); .andExpect(status().isForbidden());
@ -159,7 +159,7 @@ public class WebMvcEndpointCorsIntegrationTests {
"management.endpoints.web.cors.allowed-methods:GET,HEAD") "management.endpoints.web.cors.allowed-methods:GET,HEAD")
.applyTo(this.context); .applyTo(this.context);
createMockMvc() createMockMvc()
.perform(options("/application/beans") .perform(options("/actuator/beans")
.header(HttpHeaders.ORIGIN, "foo.example.com") .header(HttpHeaders.ORIGIN, "foo.example.com")
.header(HttpHeaders.ACCESS_CONTROL_REQUEST_METHOD, "HEAD")) .header(HttpHeaders.ACCESS_CONTROL_REQUEST_METHOD, "HEAD"))
.andExpect(status().isOk()).andExpect(header() .andExpect(status().isOk()).andExpect(header()
@ -192,7 +192,7 @@ public class WebMvcEndpointCorsIntegrationTests {
} }
private ResultActions performAcceptedCorsRequest() throws Exception { private ResultActions performAcceptedCorsRequest() throws Exception {
return performAcceptedCorsRequest("/application/beans"); return performAcceptedCorsRequest("/actuator/beans");
} }
private ResultActions performAcceptedCorsRequest(String url) throws Exception { private ResultActions performAcceptedCorsRequest(String url) throws Exception {

@ -138,7 +138,7 @@ public class WebMvcEndpointExposureIntegrationTests {
private boolean isExposed(MockMvc mockMvc, HttpMethod method, String path) private boolean isExposed(MockMvc mockMvc, HttpMethod method, String path)
throws Exception { throws Exception {
path = "/application/" + path; path = "/actuator/" + path;
MvcResult mvcResult = mockMvc.perform(request(method, path)).andReturn(); MvcResult mvcResult = mockMvc.perform(request(method, path)).andReturn();
int status = mvcResult.getResponse().getStatus(); int status = mvcResult.getResponse().getStatus();
if (status == HttpStatus.OK.value()) { if (status == HttpStatus.OK.value()) {

@ -70,7 +70,7 @@ public class WebMvcEndpointIntegrationTests {
this.context = new AnnotationConfigWebApplicationContext(); this.context = new AnnotationConfigWebApplicationContext();
this.context.register(SecureConfiguration.class); this.context.register(SecureConfiguration.class);
MockMvc mockMvc = createSecureMockMvc(); MockMvc mockMvc = createSecureMockMvc();
mockMvc.perform(get("/application/beans").accept(MediaType.APPLICATION_JSON)) mockMvc.perform(get("/actuator/beans").accept(MediaType.APPLICATION_JSON))
.andExpect(status().isUnauthorized()); .andExpect(status().isUnauthorized());
} }

@ -53,7 +53,7 @@ public class JolokiaManagementContextConfigurationTests {
ServletRegistrationBean<?> registrationBean = context ServletRegistrationBean<?> registrationBean = context
.getBean(ServletRegistrationBean.class); .getBean(ServletRegistrationBean.class);
assertThat(registrationBean.getUrlMappings()) assertThat(registrationBean.getUrlMappings())
.contains("/application/jolokia/*"); .contains("/actuator/jolokia/*");
assertThat(registrationBean.getInitParameters()).isEmpty(); assertThat(registrationBean.getInitParameters()).isEmpty();
}); });
} }
@ -69,7 +69,7 @@ public class JolokiaManagementContextConfigurationTests {
this.contextRunner this.contextRunner
.withPropertyValues("management.jolokia.enabled=true", .withPropertyValues("management.jolokia.enabled=true",
"management.jolokia.path=/lokia") "management.jolokia.path=/lokia")
.run(isDefinedOnPath("/application/lokia/*")); .run(isDefinedOnPath("/actuator/lokia/*"));
} }
@Test @Test

@ -44,53 +44,53 @@ public class EndpointRequestTests {
@Test @Test
public void toAnyEndpointShouldMatchEndpointPath() throws Exception { public void toAnyEndpointShouldMatchEndpointPath() throws Exception {
RequestMatcher matcher = EndpointRequest.toAnyEndpoint(); RequestMatcher matcher = EndpointRequest.toAnyEndpoint();
assertMatcher(matcher).matches("/application/foo"); assertMatcher(matcher).matches("/actuator/foo");
assertMatcher(matcher).matches("/application/bar"); assertMatcher(matcher).matches("/actuator/bar");
} }
@Test @Test
public void toAnyEndpointShouldNotMatchOtherPath() throws Exception { public void toAnyEndpointShouldNotMatchOtherPath() throws Exception {
RequestMatcher matcher = EndpointRequest.toAnyEndpoint(); RequestMatcher matcher = EndpointRequest.toAnyEndpoint();
assertMatcher(matcher).doesNotMatch("/application/baz"); assertMatcher(matcher).doesNotMatch("/actuator/baz");
} }
@Test @Test
public void toEndpointClassShouldMatchEndpointPath() throws Exception { public void toEndpointClassShouldMatchEndpointPath() throws Exception {
RequestMatcher matcher = EndpointRequest.to(FooEndpoint.class); RequestMatcher matcher = EndpointRequest.to(FooEndpoint.class);
assertMatcher(matcher).matches("/application/foo"); assertMatcher(matcher).matches("/actuator/foo");
} }
@Test @Test
public void toEndpointClassShouldNotMatchOtherPath() throws Exception { public void toEndpointClassShouldNotMatchOtherPath() throws Exception {
RequestMatcher matcher = EndpointRequest.to(FooEndpoint.class); RequestMatcher matcher = EndpointRequest.to(FooEndpoint.class);
assertMatcher(matcher).doesNotMatch("/application/bar"); assertMatcher(matcher).doesNotMatch("/actuator/bar");
} }
@Test @Test
public void toEndpointIdShouldMatchEndpointPath() throws Exception { public void toEndpointIdShouldMatchEndpointPath() throws Exception {
RequestMatcher matcher = EndpointRequest.to("foo"); RequestMatcher matcher = EndpointRequest.to("foo");
assertMatcher(matcher).matches("/application/foo"); assertMatcher(matcher).matches("/actuator/foo");
} }
@Test @Test
public void toEndpointIdShouldNotMatchOtherPath() throws Exception { public void toEndpointIdShouldNotMatchOtherPath() throws Exception {
RequestMatcher matcher = EndpointRequest.to("foo"); RequestMatcher matcher = EndpointRequest.to("foo");
assertMatcher(matcher).doesNotMatch("/application/bar"); assertMatcher(matcher).doesNotMatch("/actuator/bar");
} }
@Test @Test
public void excludeByClassShouldNotMatchExcluded() throws Exception { public void excludeByClassShouldNotMatchExcluded() throws Exception {
RequestMatcher matcher = EndpointRequest.toAnyEndpoint() RequestMatcher matcher = EndpointRequest.toAnyEndpoint()
.excluding(FooEndpoint.class); .excluding(FooEndpoint.class);
assertMatcher(matcher).doesNotMatch("/application/foo"); assertMatcher(matcher).doesNotMatch("/actuator/foo");
assertMatcher(matcher).matches("/application/bar"); assertMatcher(matcher).matches("/actuator/bar");
} }
@Test @Test
public void excludeByIdShouldNotMatchExcluded() throws Exception { public void excludeByIdShouldNotMatchExcluded() throws Exception {
RequestMatcher matcher = EndpointRequest.toAnyEndpoint().excluding("foo"); RequestMatcher matcher = EndpointRequest.toAnyEndpoint().excluding("foo");
assertMatcher(matcher).doesNotMatch("/application/foo"); assertMatcher(matcher).doesNotMatch("/actuator/foo");
assertMatcher(matcher).matches("/application/bar"); assertMatcher(matcher).matches("/actuator/bar");
} }
private RequestMatcherAssert assertMatcher(RequestMatcher matcher) { private RequestMatcherAssert assertMatcher(RequestMatcher matcher) {
@ -164,16 +164,16 @@ public class EndpointRequestTests {
@Override @Override
public List<String> getPaths() { public List<String> getPaths() {
return Arrays.asList("/application/foo", "/application/bar"); return Arrays.asList("/actuator/foo", "/actuator/bar");
} }
@Override @Override
public String getPath(String id) { public String getPath(String id) {
if ("foo".equals(id)) { if ("foo".equals(id)) {
return "/application/foo"; return "/actuator/foo";
} }
if ("bar".equals(id)) { if ("bar".equals(id)) {
return "/application/bar"; return "/actuator/bar";
} }
return null; return null;
} }

@ -102,12 +102,11 @@ public class RequestMappingEndpointTests {
this.endpoint.setApplicationContext(context); this.endpoint.setApplicationContext(context);
Map<String, Object> result = this.endpoint.mappings(); Map<String, Object> result = this.endpoint.mappings();
assertThat(result).hasSize(2); assertThat(result).hasSize(2);
assertThat(result.keySet()) assertThat(result.keySet()).filteredOn((key) -> key.contains("[/actuator/test]"))
.filteredOn((key) -> key.contains("[/application/test]"))
.hasOnlyOneElementSatisfying( .hasOnlyOneElementSatisfying(
(key) -> assertThat((Map<String, Object>) result.get(key)) (key) -> assertThat((Map<String, Object>) result.get(key))
.containsOnlyKeys("bean", "method")); .containsOnlyKeys("bean", "method"));
assertThat(result.keySet()).filteredOn((key) -> key.contains("[/application]")) assertThat(result.keySet()).filteredOn((key) -> key.contains("[/actuator]"))
.hasOnlyOneElementSatisfying( .hasOnlyOneElementSatisfying(
(key) -> assertThat((Map<String, Object>) result.get(key)) (key) -> assertThat((Map<String, Object>) result.get(key))
.containsOnlyKeys("bean", "method")); .containsOnlyKeys("bean", "method"));
@ -120,12 +119,11 @@ public class RequestMappingEndpointTests {
this.endpoint.setMethodMappings(Collections.singletonList(mapping)); this.endpoint.setMethodMappings(Collections.singletonList(mapping));
Map<String, Object> result = this.endpoint.mappings(); Map<String, Object> result = this.endpoint.mappings();
assertThat(result).hasSize(2); assertThat(result).hasSize(2);
assertThat(result.keySet()) assertThat(result.keySet()).filteredOn((key) -> key.contains("[/actuator/test]"))
.filteredOn((key) -> key.contains("[/application/test]"))
.hasOnlyOneElementSatisfying( .hasOnlyOneElementSatisfying(
(key) -> assertThat((Map<String, Object>) result.get(key)) (key) -> assertThat((Map<String, Object>) result.get(key))
.containsOnlyKeys("method")); .containsOnlyKeys("method"));
assertThat(result.keySet()).filteredOn((key) -> key.contains("[/application]")) assertThat(result.keySet()).filteredOn((key) -> key.contains("[/actuator]"))
.hasOnlyOneElementSatisfying( .hasOnlyOneElementSatisfying(
(key) -> assertThat((Map<String, Object>) result.get(key)) (key) -> assertThat((Map<String, Object>) result.get(key))
.containsOnlyKeys("method")); .containsOnlyKeys("method"));
@ -138,7 +136,7 @@ public class RequestMappingEndpointTests {
WebOperation operation = new WebOperation(OperationType.READ, WebOperation operation = new WebOperation(OperationType.READ,
(arguments) -> "Invoked", true, requestPredicate, "test"); (arguments) -> "Invoked", true, requestPredicate, "test");
WebMvcEndpointHandlerMapping mapping = new WebMvcEndpointHandlerMapping( WebMvcEndpointHandlerMapping mapping = new WebMvcEndpointHandlerMapping(
new EndpointMapping("application"), new EndpointMapping("actuator"),
Collections.singleton(new EndpointInfo<>("test", true, Collections.singleton(new EndpointInfo<>("test", true,
Collections.singleton(operation))), Collections.singleton(operation))),
new EndpointMediaTypes(Arrays.asList("application/vnd.test+json"), new EndpointMediaTypes(Arrays.asList("application/vnd.test+json"),

@ -43,14 +43,14 @@ public class AuditEventsEndpointWebIntegrationTests {
@Test @Test
public void eventsWithoutParams() throws Exception { 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(); .exchange().expectStatus().isBadRequest();
} }
@Test @Test
public void eventsWithDateAfter() throws Exception { public void eventsWithDateAfter() throws Exception {
client.get() client.get()
.uri((builder) -> builder.path("/application/auditevents") .uri((builder) -> builder.path("/actuator/auditevents")
.queryParam("after", "2016-11-01T13:00:00%2B00:00").build()) .queryParam("after", "2016-11-01T13:00:00%2B00:00").build())
.exchange().expectStatus().isOk().expectBody().jsonPath("events") .exchange().expectStatus().isOk().expectBody().jsonPath("events")
.isEmpty(); .isEmpty();
@ -59,7 +59,7 @@ public class AuditEventsEndpointWebIntegrationTests {
@Test @Test
public void eventsWithPrincipalAndDateAfter() throws Exception { public void eventsWithPrincipalAndDateAfter() throws Exception {
client.get() client.get()
.uri((builder) -> builder.path("/application/auditevents") .uri((builder) -> builder.path("/actuator/auditevents")
.queryParam("after", "2016-11-01T10:00:00%2B00:00") .queryParam("after", "2016-11-01T10:00:00%2B00:00")
.queryParam("principal", "user").build()) .queryParam("principal", "user").build())
.exchange().expectStatus().isOk().expectBody() .exchange().expectStatus().isOk().expectBody()
@ -70,7 +70,7 @@ public class AuditEventsEndpointWebIntegrationTests {
@Test @Test
public void eventsWithPrincipalDateAfterAndType() throws Exception { public void eventsWithPrincipalDateAfterAndType() throws Exception {
client.get() client.get()
.uri((builder) -> builder.path("/application/auditevents") .uri((builder) -> builder.path("/actuator/auditevents")
.queryParam("after", "2016-11-01T10:00:00%2B00:00") .queryParam("after", "2016-11-01T10:00:00%2B00:00")
.queryParam("principal", "admin").queryParam("type", "logout") .queryParam("principal", "admin").queryParam("type", "logout")
.build()) .build())

@ -40,19 +40,19 @@ public class EndpointLinksResolverTests {
@Test @Test
public void linkResolutionWithTrailingSlashStripsSlashOnSelfLink() { public void linkResolutionWithTrailingSlashStripsSlashOnSelfLink() {
Map<String, Link> links = this.linksResolver.resolveLinks(Collections.emptyList(), Map<String, Link> links = this.linksResolver.resolveLinks(Collections.emptyList(),
"https://api.example.com/application/"); "https://api.example.com/actuator/");
assertThat(links).hasSize(1); assertThat(links).hasSize(1);
assertThat(links).hasEntrySatisfying("self", assertThat(links).hasEntrySatisfying("self",
linkWithHref("https://api.example.com/application")); linkWithHref("https://api.example.com/actuator"));
} }
@Test @Test
public void linkResolutionWithoutTrailingSlash() { public void linkResolutionWithoutTrailingSlash() {
Map<String, Link> links = this.linksResolver.resolveLinks(Collections.emptyList(), Map<String, Link> links = this.linksResolver.resolveLinks(Collections.emptyList(),
"https://api.example.com/application"); "https://api.example.com/actuator");
assertThat(links).hasSize(1); assertThat(links).hasSize(1);
assertThat(links).hasEntrySatisfying("self", assertThat(links).hasEntrySatisfying("self",
linkWithHref("https://api.example.com/application")); linkWithHref("https://api.example.com/actuator"));
} }
@Test @Test
@ -63,14 +63,14 @@ public class EndpointLinksResolverTests {
Arrays.asList(operationWithPath("/alpha", "alpha"), Arrays.asList(operationWithPath("/alpha", "alpha"),
operationWithPath("/alpha/{name}", operationWithPath("/alpha/{name}",
"alpha-name")))), "alpha-name")))),
"https://api.example.com/application"); "https://api.example.com/actuator");
assertThat(links).hasSize(3); assertThat(links).hasSize(3);
assertThat(links).hasEntrySatisfying("self", assertThat(links).hasEntrySatisfying("self",
linkWithHref("https://api.example.com/application")); linkWithHref("https://api.example.com/actuator"));
assertThat(links).hasEntrySatisfying("alpha", assertThat(links).hasEntrySatisfying("alpha",
linkWithHref("https://api.example.com/application/alpha")); linkWithHref("https://api.example.com/actuator/alpha"));
assertThat(links).hasEntrySatisfying("alpha-name", 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) { private WebOperation operationWithPath(String path, String id) {

@ -101,7 +101,7 @@ class JerseyEndpointsRunner extends AbstractWebEndpointRunner {
this.applicationContext, new ConversionServiceParameterMapper(), this.applicationContext, new ConversionServiceParameterMapper(),
endpointMediaTypes, EndpointPathResolver.useEndpointId(), null, null); endpointMediaTypes, EndpointPathResolver.useEndpointId(), null, null);
Collection<Resource> resources = new JerseyEndpointResourceFactory() Collection<Resource> resources = new JerseyEndpointResourceFactory()
.createEndpointResources(new EndpointMapping("/application"), .createEndpointResources(new EndpointMapping("/actuator"),
discoverer.discoverEndpoints(), endpointMediaTypes); discoverer.discoverEndpoints(), endpointMediaTypes);
config.registerResources(new HashSet<>(resources)); config.registerResources(new HashSet<>(resources));
} }

@ -106,7 +106,7 @@ class WebFluxEndpointsRunner extends AbstractWebEndpointRunner {
WebAnnotationEndpointDiscoverer discoverer = new WebAnnotationEndpointDiscoverer( WebAnnotationEndpointDiscoverer discoverer = new WebAnnotationEndpointDiscoverer(
this.applicationContext, new ConversionServiceParameterMapper(), this.applicationContext, new ConversionServiceParameterMapper(),
endpointMediaTypes, EndpointPathResolver.useEndpointId(), null, null); endpointMediaTypes, EndpointPathResolver.useEndpointId(), null, null);
return new WebFluxEndpointHandlerMapping(new EndpointMapping("/application"), return new WebFluxEndpointHandlerMapping(new EndpointMapping("/actuator"),
discoverer.discoverEndpoints(), endpointMediaTypes, discoverer.discoverEndpoints(), endpointMediaTypes,
new CorsConfiguration()); new CorsConfiguration());
} }

@ -89,7 +89,7 @@ class WebMvcEndpointRunner extends AbstractWebEndpointRunner {
WebAnnotationEndpointDiscoverer discoverer = new WebAnnotationEndpointDiscoverer( WebAnnotationEndpointDiscoverer discoverer = new WebAnnotationEndpointDiscoverer(
this.applicationContext, new ConversionServiceParameterMapper(), this.applicationContext, new ConversionServiceParameterMapper(),
endpointMediaTypes, EndpointPathResolver.useEndpointId(), null, null); endpointMediaTypes, EndpointPathResolver.useEndpointId(), null, null);
return new WebMvcEndpointHandlerMapping(new EndpointMapping("/application"), return new WebMvcEndpointHandlerMapping(new EndpointMapping("/actuator"),
discoverer.discoverEndpoints(), endpointMediaTypes, discoverer.discoverEndpoints(), endpointMediaTypes,
new CorsConfiguration()); new CorsConfiguration());
} }

@ -46,13 +46,13 @@ public class EnvironmentEndpointWebIntegrationTests {
@Test @Test
public void home() throws Exception { 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(); .jsonPath("propertySources[?(@.name=='systemProperties')]").exists();
} }
@Test @Test
public void sub() throws Exception { 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") .expectBody().jsonPath("property.source").isEqualTo("test")
.jsonPath("property.value").isEqualTo("bar"); .jsonPath("property.value").isEqualTo("bar");
} }
@ -63,8 +63,8 @@ public class EnvironmentEndpointWebIntegrationTests {
map.put("food", null); map.put("food", null);
EnvironmentEndpointWebIntegrationTests.context.getEnvironment() EnvironmentEndpointWebIntegrationTests.context.getEnvironment()
.getPropertySources().addFirst(new MapPropertySource("null-value", map)); .getPropertySources().addFirst(new MapPropertySource("null-value", map));
client.get().uri("/application/env?pattern=foo.*").exchange().expectStatus() client.get().uri("/actuator/env?pattern=foo.*").exchange().expectStatus().isOk()
.isOk().expectBody().jsonPath(forProperty("test", "foo")).isEqualTo("bar") .expectBody().jsonPath(forProperty("test", "foo")).isEqualTo("bar")
.jsonPath(forProperty("test", "fool")).isEqualTo("baz"); .jsonPath(forProperty("test", "fool")).isEqualTo("baz");
} }
@ -75,7 +75,7 @@ public class EnvironmentEndpointWebIntegrationTests {
map.put("my.foo", "${my.bar}"); map.put("my.foo", "${my.bar}");
context.getEnvironment().getPropertySources() context.getEnvironment().getPropertySources()
.addFirst(new MapPropertySource("unresolved-placeholder", map)); .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}") .expectBody().jsonPath("property.value").isEqualTo("${my.bar}")
.jsonPath(forPropertyEntry("unresolved-placeholder")) .jsonPath(forPropertyEntry("unresolved-placeholder"))
.isEqualTo("${my.bar}"); .isEqualTo("${my.bar}");
@ -88,14 +88,14 @@ public class EnvironmentEndpointWebIntegrationTests {
map.put("my.password", "hello"); map.put("my.password", "hello");
context.getEnvironment().getPropertySources() context.getEnvironment().getPropertySources()
.addFirst(new MapPropertySource("placeholder", map)); .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("******") .expectBody().jsonPath("property.value").isEqualTo("******")
.jsonPath(forPropertyEntry("placeholder")).isEqualTo("******"); .jsonPath(forPropertyEntry("placeholder")).isEqualTo("******");
} }
@Test @Test
public void nestedPathForUnknownKeyShouldReturn404AndBody() throws Exception { 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() .isNotFound().expectBody().jsonPath("property").doesNotExist()
.jsonPath("propertySources[?(@.name=='test')]").exists() .jsonPath("propertySources[?(@.name=='test')]").exists()
.jsonPath("propertySources[?(@.name=='systemProperties')]").exists() .jsonPath("propertySources[?(@.name=='systemProperties')]").exists()
@ -109,7 +109,7 @@ public class EnvironmentEndpointWebIntegrationTests {
map.put("my.foo", "${my.bar}"); map.put("my.foo", "${my.bar}");
context.getEnvironment().getPropertySources() context.getEnvironment().getPropertySources()
.addFirst(new MapPropertySource("unresolved-placeholder", map)); .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() .expectBody()
.jsonPath( .jsonPath(
"propertySources[?(@.name=='unresolved-placeholder')].properties.['my.foo'].value") "propertySources[?(@.name=='unresolved-placeholder')].properties.['my.foo'].value")
@ -124,7 +124,7 @@ public class EnvironmentEndpointWebIntegrationTests {
map.put("my.password", "hello"); map.put("my.password", "hello");
context.getEnvironment().getPropertySources() context.getEnvironment().getPropertySources()
.addFirst(new MapPropertySource("placeholder", map)); .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")) .expectBody().jsonPath(forProperty("placeholder", "my.foo"))
.isEqualTo("******"); .isEqualTo("******");
} }

@ -43,17 +43,16 @@ public class HealthEndpointWebIntegrationTests {
@Test @Test
public void whenHealthIsUp200ResponseIsReturned() throws Exception { public void whenHealthIsUp200ResponseIsReturned() throws Exception {
client.get().uri("/application/health").exchange().expectStatus().isOk() client.get().uri("/actuator/health").exchange().expectStatus().isOk().expectBody()
.expectBody().jsonPath("status").isEqualTo("UP") .jsonPath("status").isEqualTo("UP").jsonPath("details.alpha.status")
.jsonPath("details.alpha.status").isEqualTo("UP") .isEqualTo("UP").jsonPath("details.bravo.status").isEqualTo("UP");
.jsonPath("details.bravo.status").isEqualTo("UP");
} }
@Test @Test
public void whenHealthIsDown503ResponseIsReturned() throws Exception { public void whenHealthIsDown503ResponseIsReturned() throws Exception {
context.getBean("alphaHealthIndicator", TestHealthIndicator.class) context.getBean("alphaHealthIndicator", TestHealthIndicator.class)
.setHealth(Health.down().build()); .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(HttpStatus.SERVICE_UNAVAILABLE).expectBody().jsonPath("status")
.isEqualTo("DOWN").jsonPath("details.alpha.status").isEqualTo("DOWN") .isEqualTo("DOWN").jsonPath("details.alpha.status").isEqualTo("DOWN")
.jsonPath("details.bravo.status").isEqualTo("UP"); .jsonPath("details.bravo.status").isEqualTo("UP");

@ -45,8 +45,8 @@ public class InfoEndpointWebIntegrationTests {
@Test @Test
public void info() throws Exception { public void info() throws Exception {
client.get().uri("/application/info").accept(MediaType.APPLICATION_JSON) client.get().uri("/actuator/info").accept(MediaType.APPLICATION_JSON).exchange()
.exchange().expectStatus().isOk().expectBody().jsonPath("beanName1.key11") .expectStatus().isOk().expectBody().jsonPath("beanName1.key11")
.isEqualTo("value11").jsonPath("beanName1.key12").isEqualTo("value12") .isEqualTo("value11").jsonPath("beanName1.key12").isEqualTo("value12")
.jsonPath("beanName2.key21").isEqualTo("value21") .jsonPath("beanName2.key21").isEqualTo("value21")
.jsonPath("beanName2.key22").isEqualTo("value22"); .jsonPath("beanName2.key22").isEqualTo("value22");

@ -60,14 +60,14 @@ public class LogFileWebEndpointWebIntegrationTests {
@Test @Test
public void getRequestProduces404ResponseWhenLogFileNotFound() throws Exception { public void getRequestProduces404ResponseWhenLogFileNotFound() throws Exception {
client.get().uri("/application/logfile").exchange().expectStatus().isNotFound(); client.get().uri("/actuator/logfile").exchange().expectStatus().isNotFound();
} }
@Test @Test
public void getRequestProducesResponseWithLogFile() throws Exception { public void getRequestProducesResponseWithLogFile() throws Exception {
TestPropertyValues.of("logging.file:" + this.logFile.getAbsolutePath()) TestPropertyValues.of("logging.file:" + this.logFile.getAbsolutePath())
.applyTo(context); .applyTo(context);
client.get().uri("/application/logfile").exchange().expectStatus().isOk() client.get().uri("/actuator/logfile").exchange().expectStatus().isOk()
.expectBody(String.class).isEqualTo("--TEST--"); .expectBody(String.class).isEqualTo("--TEST--");
} }

@ -75,7 +75,7 @@ public class LoggersEndpointWebIntegrationTests {
public void getLoggerShouldReturnAllLoggerConfigurations() throws Exception { public void getLoggerShouldReturnAllLoggerConfigurations() throws Exception {
given(this.loggingSystem.getLoggerConfigurations()).willReturn(Collections given(this.loggingSystem.getLoggerConfigurations()).willReturn(Collections
.singletonList(new LoggerConfiguration("ROOT", null, LogLevel.DEBUG))); .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") .expectBody().jsonPath("$.length()").isEqualTo(2).jsonPath("levels")
.isEqualTo(jsonArrayOf("OFF", "FATAL", "ERROR", "WARN", "INFO", "DEBUG", .isEqualTo(jsonArrayOf("OFF", "FATAL", "ERROR", "WARN", "INFO", "DEBUG",
"TRACE")) "TRACE"))
@ -89,7 +89,7 @@ public class LoggersEndpointWebIntegrationTests {
public void getLoggerShouldReturnLogLevels() throws Exception { public void getLoggerShouldReturnLogLevels() throws Exception {
given(this.loggingSystem.getLoggerConfiguration("ROOT")) given(this.loggingSystem.getLoggerConfiguration("ROOT"))
.willReturn(new LoggerConfiguration("ROOT", null, LogLevel.DEBUG)); .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) .expectBody().jsonPath("$.length()").isEqualTo(2)
.jsonPath("configuredLevel").isEqualTo(null).jsonPath("effectiveLevel") .jsonPath("configuredLevel").isEqualTo(null).jsonPath("effectiveLevel")
.isEqualTo("DEBUG"); .isEqualTo("DEBUG");
@ -97,13 +97,13 @@ public class LoggersEndpointWebIntegrationTests {
@Test @Test
public void getLoggersWhenLoggerNotFoundShouldReturnNotFound() throws Exception { public void getLoggersWhenLoggerNotFoundShouldReturnNotFound() throws Exception {
client.get().uri("/application/loggers/com.does.not.exist").exchange() client.get().uri("/actuator/loggers/com.does.not.exist").exchange().expectStatus()
.expectStatus().isNotFound(); .isNotFound();
} }
@Test @Test
public void setLoggerUsingApplicationJsonShouldSetLogLevel() throws Exception { public void setLoggerUsingApplicationJsonShouldSetLogLevel() throws Exception {
client.post().uri("/application/loggers/ROOT") client.post().uri("/actuator/loggers/ROOT")
.contentType(MediaType.APPLICATION_JSON) .contentType(MediaType.APPLICATION_JSON)
.syncBody(Collections.singletonMap("configuredLevel", "debug")).exchange() .syncBody(Collections.singletonMap("configuredLevel", "debug")).exchange()
.expectStatus().isNoContent(); .expectStatus().isNoContent();
@ -112,7 +112,7 @@ public class LoggersEndpointWebIntegrationTests {
@Test @Test
public void setLoggerUsingActuatorV2JsonShouldSetLogLevel() throws Exception { public void setLoggerUsingActuatorV2JsonShouldSetLogLevel() throws Exception {
client.post().uri("/application/loggers/ROOT") client.post().uri("/actuator/loggers/ROOT")
.contentType(MediaType.parseMediaType(ActuatorMediaType.V2_JSON)) .contentType(MediaType.parseMediaType(ActuatorMediaType.V2_JSON))
.syncBody(Collections.singletonMap("configuredLevel", "debug")).exchange() .syncBody(Collections.singletonMap("configuredLevel", "debug")).exchange()
.expectStatus().isNoContent(); .expectStatus().isNoContent();
@ -121,7 +121,7 @@ public class LoggersEndpointWebIntegrationTests {
@Test @Test
public void setLoggerWithWrongLogLevelResultInBadRequestResponse() throws Exception { public void setLoggerWithWrongLogLevelResultInBadRequestResponse() throws Exception {
client.post().uri("/application/loggers/ROOT") client.post().uri("/actuator/loggers/ROOT")
.contentType(MediaType.APPLICATION_JSON) .contentType(MediaType.APPLICATION_JSON)
.syncBody(Collections.singletonMap("configuredLevel", "other")).exchange() .syncBody(Collections.singletonMap("configuredLevel", "other")).exchange()
.expectStatus().isBadRequest(); .expectStatus().isBadRequest();
@ -130,7 +130,7 @@ public class LoggersEndpointWebIntegrationTests {
@Test @Test
public void setLoggerWithNullLogLevel() throws Exception { public void setLoggerWithNullLogLevel() throws Exception {
client.post().uri("/application/loggers/ROOT") client.post().uri("/actuator/loggers/ROOT")
.contentType(MediaType.parseMediaType(ActuatorMediaType.V2_JSON)) .contentType(MediaType.parseMediaType(ActuatorMediaType.V2_JSON))
.syncBody(Collections.singletonMap("configuredLevel", null)).exchange() .syncBody(Collections.singletonMap("configuredLevel", null)).exchange()
.expectStatus().isNoContent(); .expectStatus().isNoContent();
@ -139,7 +139,7 @@ public class LoggersEndpointWebIntegrationTests {
@Test @Test
public void setLoggerWithNoLogLevel() throws Exception { public void setLoggerWithNoLogLevel() throws Exception {
client.post().uri("/application/loggers/ROOT") client.post().uri("/actuator/loggers/ROOT")
.contentType(MediaType.parseMediaType(ActuatorMediaType.V2_JSON)) .contentType(MediaType.parseMediaType(ActuatorMediaType.V2_JSON))
.syncBody(Collections.emptyMap()).exchange().expectStatus().isNoContent(); .syncBody(Collections.emptyMap()).exchange().expectStatus().isNoContent();
verify(this.loggingSystem).setLogLevel("ROOT", null); verify(this.loggingSystem).setLogLevel("ROOT", null);
@ -150,7 +150,7 @@ public class LoggersEndpointWebIntegrationTests {
throws Exception { throws Exception {
given(this.loggingSystem.getLoggerConfiguration("com.png")) given(this.loggingSystem.getLoggerConfiguration("com.png"))
.willReturn(new LoggerConfiguration("com.png", null, LogLevel.DEBUG)); .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) .expectBody().jsonPath("$.length()").isEqualTo(2)
.jsonPath("configuredLevel").isEqualTo(null).jsonPath("effectiveLevel") .jsonPath("configuredLevel").isEqualTo(null).jsonPath("effectiveLevel")
.isEqualTo("DEBUG"); .isEqualTo("DEBUG");

@ -61,13 +61,13 @@ public class HeapDumpWebEndpointWebIntegrationTests {
public void invokeWhenNotAvailableShouldReturnServiceUnavailableStatus() public void invokeWhenNotAvailableShouldReturnServiceUnavailableStatus()
throws Exception { throws Exception {
this.endpoint.setAvailable(false); this.endpoint.setAvailable(false);
client.get().uri("/application/heapdump").exchange().expectStatus() client.get().uri("/actuator/heapdump").exchange().expectStatus()
.isEqualTo(HttpStatus.SERVICE_UNAVAILABLE); .isEqualTo(HttpStatus.SERVICE_UNAVAILABLE);
} }
@Test @Test
public void getRequestShouldReturnHeapDumpInResponseBody() throws Exception { 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) .expectHeader().contentType(MediaType.APPLICATION_OCTET_STREAM)
.expectBody(String.class).isEqualTo("HEAPDUMP"); .expectBody(String.class).isEqualTo("HEAPDUMP");
assertHeapDumpFileIsDeleted(); assertHeapDumpFileIsDeleted();

@ -55,7 +55,7 @@ public class MetricsEndpointWebIntegrationTests {
@Test @Test
@SuppressWarnings("unchecked") @SuppressWarnings("unchecked")
public void listNames() throws IOException { 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() .expectStatus().isOk().expectBody(String.class).returnResult()
.getResponseBody(); .getResponseBody();
Map<String, List<String>> names = this.mapper.readValue(responseBody, Map.class); Map<String, List<String>> names = this.mapper.readValue(responseBody, Map.class);
@ -65,7 +65,7 @@ public class MetricsEndpointWebIntegrationTests {
@Test @Test
public void selectByName() throws IOException { public void selectByName() throws IOException {
MockClock.clock(registry).add(SimpleConfig.DEFAULT_STEP); 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"); .isOk().expectBody().jsonPath("$.name").isEqualTo("jvm.memory.used");
} }
@ -73,7 +73,7 @@ public class MetricsEndpointWebIntegrationTests {
public void selectByTag() { public void selectByTag() {
MockClock.clock(registry).add(SimpleConfig.DEFAULT_STEP); MockClock.clock(registry).add(SimpleConfig.DEFAULT_STEP);
client.get() 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") .exchange().expectStatus().isOk().expectBody().jsonPath("$.name")
.isEqualTo("jvm.memory.used"); .isEqualTo("jvm.memory.used");
} }

@ -42,7 +42,7 @@ public class PrometheusScrapeEndpointIntegrationTests {
@Test @Test
public void scrapeHasContentTypeText004() { public void scrapeHasContentTypeText004() {
client.get().uri("/application/prometheus").exchange().expectStatus().isOk() client.get().uri("/actuator/prometheus").exchange().expectStatus().isOk()
.expectHeader() .expectHeader()
.contentType(MediaType.parseMediaType(TextFormat.CONTENT_TYPE_004)); .contentType(MediaType.parseMediaType(TextFormat.CONTENT_TYPE_004));
} }

@ -52,7 +52,7 @@ public class SessionsEndpointWebIntegrationTests {
@Test @Test
public void sessionsForUsernameWithoutUsernameParam() throws Exception { 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(); .exchange().expectStatus().isBadRequest();
} }
@ -62,7 +62,7 @@ public class SessionsEndpointWebIntegrationTests {
FindByIndexNameSessionRepository.PRINCIPAL_NAME_INDEX_NAME, "user")) FindByIndexNameSessionRepository.PRINCIPAL_NAME_INDEX_NAME, "user"))
.willReturn(Collections.emptyMap()); .willReturn(Collections.emptyMap());
client.get() client.get()
.uri((builder) -> builder.path("/application/sessions") .uri((builder) -> builder.path("/actuator/sessions")
.queryParam("username", "user").build()) .queryParam("username", "user").build())
.exchange().expectStatus().isOk().expectBody().jsonPath("sessions") .exchange().expectStatus().isOk().expectBody().jsonPath("sessions")
.isEmpty(); .isEmpty();
@ -74,7 +74,7 @@ public class SessionsEndpointWebIntegrationTests {
FindByIndexNameSessionRepository.PRINCIPAL_NAME_INDEX_NAME, "user")) FindByIndexNameSessionRepository.PRINCIPAL_NAME_INDEX_NAME, "user"))
.willReturn(Collections.singletonMap(session.getId(), session)); .willReturn(Collections.singletonMap(session.getId(), session));
client.get() client.get()
.uri((builder) -> builder.path("/application/sessions") .uri((builder) -> builder.path("/actuator/sessions")
.queryParam("username", "user").build()) .queryParam("username", "user").build())
.exchange().expectStatus().isOk().expectBody().jsonPath("sessions.[*].id") .exchange().expectStatus().isOk().expectBody().jsonPath("sessions.[*].id")
.isEqualTo(new JSONArray().appendElement(session.getId())); .isEqualTo(new JSONArray().appendElement(session.getId()));

@ -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.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.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.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. 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]) # ENDPOINTS CORS CONFIGURATION ({sc-spring-boot-actuator-autoconfigure}/endpoint/web/servlet/CorsEndpointProperties.{sc-ext}[CorsEndpointProperties])

@ -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 `+@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 `--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 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. equivalent) for the same information.
* Look for classes that are `@ConfigurationProperties` (such as * Look for classes that are `@ConfigurationProperties` (such as
{sc-spring-boot-autoconfigure}/web/ServerProperties.{sc-ext}[`ServerProperties`]) {sc-spring-boot-autoconfigure}/web/ServerProperties.{sc-ext}[`ServerProperties`])

@ -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. 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 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` prefix of `/actuator` is mapped to a URL. For example, by default, the `health`
endpoint is mapped to `/application/health`. endpoint is mapped to `/actuator/health`.
The following technology-agnostic endpoints are available: The following technology-agnostic endpoints are available:
@ -257,10 +257,10 @@ and `exclude` properties (see <<production-ready-endpoints-exposing-endpoints>>)
[[production-ready-endpoint-hypermedia]] [[production-ready-endpoint-hypermedia]]
=== Hypermedia for Actuator Web Endpoints === Hypermedia for Actuator Web Endpoints
A "`discovery page`" is added with links to all the endpoints. The "`discovery page`" is 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 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 context path is `/management`, then the discovery page is available from
`/management`. When the management context path is set to `/`, the discovery page is `/management`. When the management context path is set to `/`, the discovery page is
disabled to prevent the possibility of a clash with other mappings. 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]] [[production-ready-endpoint-custom-mapping]]
=== Actuator Web Endpoint Paths === Actuator Web Endpoint Paths
By default, endpoints are exposed over HTTP under the `/application` path using ID of the By default, endpoints are exposed over HTTP under the `/actuator` path using ID of the
endpoint. For example, the `beans` endpoint is exposed under `/application/beans`. If you 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 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.path-mapping` property. You can also use
`management.endpoints.web.base-path` if you want change the base path. `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 .application.properties
[source,properties,indent=0] [source,properties,indent=0]
@ -642,15 +642,15 @@ additional entry:
== Monitoring and Management over HTTP == Monitoring and Management over HTTP
If you are developing a Spring MVC application, Spring Boot Actuator auto-configures all 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 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 the endpoint with a prefix of `/actuator` as the URL path. For example, `health` is
exposed as `/application/health`. exposed as `/actuator/health`.
[[production-ready-customizing-management-server-context-path]] [[production-ready-customizing-management-server-context-path]]
=== Customizing the Management Endpoint Paths === Customizing the Management Endpoint Paths
Sometimes, it is useful to customize the prefix for the management endpoints. For 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 use the `management.endpoints.web.base-path` property to change the prefix for your
management endpoint, as shown in the following example: 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 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 NOTE: Unless the management port has been configured to
<<production-ready-customizing-management-server-port,expose endpoints using a different <<production-ready-customizing-management-server-port,expose endpoints using a different
@ -882,7 +882,7 @@ Maven, you would add the following dependency:
</dependency> </dependency>
---- ----
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. server.

@ -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 TIP: The `spring-boot-actuator` module includes an endpoint that exposes all
`@ConfigurationProperties` beans. Point your web browser to `@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
"<<production-ready-features.adoc#production-ready-endpoints, Production ready features>>" "<<production-ready-features.adoc#production-ready-endpoints, Production ready features>>"
section for details. section for details.

@ -65,15 +65,14 @@ public class CorsSampleActuatorApplicationTests {
@Test @Test
public void endpointShouldReturnUnauthorized() throws Exception { public void endpointShouldReturnUnauthorized() throws Exception {
ResponseEntity<?> entity = this.testRestTemplate.getForEntity("/application/env", ResponseEntity<?> entity = this.testRestTemplate.getForEntity("/actuator/env",
Map.class); Map.class);
assertThat(entity.getStatusCode()).isEqualTo(HttpStatus.UNAUTHORIZED); assertThat(entity.getStatusCode()).isEqualTo(HttpStatus.UNAUTHORIZED);
} }
@Test @Test
public void preflightRequestToEndpointShouldReturnOk() throws Exception { public void preflightRequestToEndpointShouldReturnOk() throws Exception {
RequestEntity<?> healthRequest = RequestEntity RequestEntity<?> healthRequest = RequestEntity.options(new URI("/actuator/env"))
.options(new URI("/application/env"))
.header("Origin", "http://localhost:8080") .header("Origin", "http://localhost:8080")
.header("Access-Control-Request-Method", "GET").build(); .header("Access-Control-Request-Method", "GET").build();
ResponseEntity<?> exchange = this.testRestTemplate.exchange(healthRequest, ResponseEntity<?> exchange = this.testRestTemplate.exchange(healthRequest,
@ -84,7 +83,7 @@ public class CorsSampleActuatorApplicationTests {
@Test @Test
public void preflightRequestWhenCorsConfigInvalidShouldReturnForbidden() public void preflightRequestWhenCorsConfigInvalidShouldReturnForbidden()
throws Exception { throws Exception {
RequestEntity<?> entity = RequestEntity.options(new URI("/application/env")) RequestEntity<?> entity = RequestEntity.options(new URI("/actuator/env"))
.header("Origin", "http://localhost:9095") .header("Origin", "http://localhost:9095")
.header("Access-Control-Request-Method", "GET").build(); .header("Access-Control-Request-Method", "GET").build();
ResponseEntity<byte[]> exchange = this.testRestTemplate.exchange(entity, ResponseEntity<byte[]> exchange = this.testRestTemplate.exchange(entity,

@ -58,16 +58,16 @@ public class ManagementPortAndPathSampleActuatorApplicationTests {
@Test @Test
public void testSecureActuator() throws Exception { public void testSecureActuator() throws Exception {
ResponseEntity<String> entity = new TestRestTemplate().getForEntity( ResponseEntity<String> entity = new TestRestTemplate().getForEntity(
"http://localhost:" + this.managementPort + "/management/application/env", "http://localhost:" + this.managementPort + "/management/actuator/env",
String.class); String.class);
assertThat(entity.getStatusCode()).isEqualTo(HttpStatus.UNAUTHORIZED); assertThat(entity.getStatusCode()).isEqualTo(HttpStatus.UNAUTHORIZED);
} }
@Test @Test
public void testInsecureActuator() throws Exception { public void testInsecureActuator() throws Exception {
ResponseEntity<String> entity = new TestRestTemplate() ResponseEntity<String> entity = new TestRestTemplate().getForEntity(
.getForEntity("http://localhost:" + this.managementPort "http://localhost:" + this.managementPort + "/management/actuator/health",
+ "/management/application/health", String.class); String.class);
assertThat(entity.getStatusCode()).isEqualTo(HttpStatus.OK); assertThat(entity.getStatusCode()).isEqualTo(HttpStatus.OK);
assertThat(entity.getBody()).contains("\"status\":\"UP\""); assertThat(entity.getBody()).contains("\"status\":\"UP\"");
} }
@ -76,7 +76,7 @@ public class ManagementPortAndPathSampleActuatorApplicationTests {
public void testMissing() throws Exception { public void testMissing() throws Exception {
ResponseEntity<String> entity = new TestRestTemplate("admin", "admin") ResponseEntity<String> entity = new TestRestTemplate("admin", "admin")
.getForEntity("http://localhost:" + this.managementPort .getForEntity("http://localhost:" + this.managementPort
+ "/management/application/missing", String.class); + "/management/actuator/missing", String.class);
assertThat(entity.getStatusCode()).isEqualTo(HttpStatus.NOT_FOUND); assertThat(entity.getStatusCode()).isEqualTo(HttpStatus.NOT_FOUND);
assertThat(entity.getBody()).contains("\"status\":404"); assertThat(entity.getBody()).contains("\"status\":404");
} }

@ -72,8 +72,8 @@ public class SampleActuatorCustomSecurityApplicationTests {
@Test @Test
public void insecureActuator() throws Exception { public void insecureActuator() throws Exception {
ResponseEntity<String> entity = this.restTemplate ResponseEntity<String> entity = this.restTemplate.getForEntity("/actuator/health",
.getForEntity("/application/health", String.class); String.class);
assertThat(entity.getStatusCode()).isEqualTo(HttpStatus.OK); assertThat(entity.getStatusCode()).isEqualTo(HttpStatus.OK);
assertThat(entity.getBody()).contains("\"status\":\"UP\""); assertThat(entity.getBody()).contains("\"status\":\"UP\"");
} }
@ -81,7 +81,7 @@ public class SampleActuatorCustomSecurityApplicationTests {
@Test @Test
public void secureActuator() throws Exception { public void secureActuator() throws Exception {
@SuppressWarnings("rawtypes") @SuppressWarnings("rawtypes")
ResponseEntity<Map> entity = this.restTemplate.getForEntity("/application/env", ResponseEntity<Map> entity = this.restTemplate.getForEntity("/actuator/env",
Map.class); Map.class);
assertThat(entity.getStatusCode()).isEqualTo(HttpStatus.UNAUTHORIZED); assertThat(entity.getStatusCode()).isEqualTo(HttpStatus.UNAUTHORIZED);
} }

@ -66,7 +66,7 @@ public class SampleActuatorLog4J2ApplicationTests {
@Test @Test
public void validateLoggersEndpoint() throws Exception { public void validateLoggersEndpoint() throws Exception {
this.mvc.perform( this.mvc.perform(
get("/application/loggers/org.apache.coyote.http11.Http11NioProtocol") get("/actuator/loggers/org.apache.coyote.http11.Http11NioProtocol")
.header("Authorization", "Basic " + getBasicAuth())) .header("Authorization", "Basic " + getBasicAuth()))
.andExpect(status().isOk()) .andExpect(status().isOk())
.andExpect(content().string(equalTo("{\"configuredLevel\":\"WARN\"," .andExpect(content().string(equalTo("{\"configuredLevel\":\"WARN\","

@ -59,7 +59,7 @@ public class SampleActuatorUiApplicationPortTests {
public void testMetrics() throws Exception { public void testMetrics() throws Exception {
@SuppressWarnings("rawtypes") @SuppressWarnings("rawtypes")
ResponseEntity<Map> entity = new TestRestTemplate().getForEntity( ResponseEntity<Map> entity = new TestRestTemplate().getForEntity(
"http://localhost:" + this.managementPort + "/application/metrics", "http://localhost:" + this.managementPort + "/actuator/metrics",
Map.class); Map.class);
assertThat(entity.getStatusCode()).isEqualTo(HttpStatus.UNAUTHORIZED); assertThat(entity.getStatusCode()).isEqualTo(HttpStatus.UNAUTHORIZED);
} }
@ -68,7 +68,7 @@ public class SampleActuatorUiApplicationPortTests {
public void testHealth() throws Exception { public void testHealth() throws Exception {
ResponseEntity<String> entity = new TestRestTemplate() ResponseEntity<String> entity = new TestRestTemplate()
.withBasicAuth("user", getPassword()).getForEntity( .withBasicAuth("user", getPassword()).getForEntity(
"http://localhost:" + this.managementPort + "/application/health", "http://localhost:" + this.managementPort + "/actuator/health",
String.class); String.class);
assertThat(entity.getStatusCode()).isEqualTo(HttpStatus.OK); assertThat(entity.getStatusCode()).isEqualTo(HttpStatus.OK);
assertThat(entity.getBody()).contains("\"status\":\"UP\""); assertThat(entity.getBody()).contains("\"status\":\"UP\"");

@ -70,8 +70,8 @@ public class SampleActuatorUiApplicationTests {
@Test @Test
public void testMetrics() throws Exception { public void testMetrics() throws Exception {
@SuppressWarnings("rawtypes") @SuppressWarnings("rawtypes")
ResponseEntity<Map> entity = this.restTemplate ResponseEntity<Map> entity = this.restTemplate.getForEntity("/actuator/metrics",
.getForEntity("/application/metrics", Map.class); Map.class);
assertThat(entity.getStatusCode()).isEqualTo(HttpStatus.UNAUTHORIZED); assertThat(entity.getStatusCode()).isEqualTo(HttpStatus.UNAUTHORIZED);
} }

@ -61,8 +61,7 @@ public class ManagementAddressActuatorApplicationTests {
public void testHealth() throws Exception { public void testHealth() throws Exception {
ResponseEntity<String> entity = new TestRestTemplate() ResponseEntity<String> entity = new TestRestTemplate()
.withBasicAuth("user", getPassword()).getForEntity("http://localhost:" .withBasicAuth("user", getPassword()).getForEntity("http://localhost:"
+ this.managementPort + "/admin/application/health", + this.managementPort + "/admin/actuator/health", String.class);
String.class);
assertThat(entity.getStatusCode()).isEqualTo(HttpStatus.OK); assertThat(entity.getStatusCode()).isEqualTo(HttpStatus.OK);
assertThat(entity.getBody()).contains("\"status\":\"UP\""); assertThat(entity.getBody()).contains("\"status\":\"UP\"");
} }

@ -64,7 +64,7 @@ public class ManagementPortSampleActuatorApplicationTests {
testHome(); // makes sure some requests have been made testHome(); // makes sure some requests have been made
@SuppressWarnings("rawtypes") @SuppressWarnings("rawtypes")
ResponseEntity<Map> entity = new TestRestTemplate().getForEntity( ResponseEntity<Map> entity = new TestRestTemplate().getForEntity(
"http://localhost:" + this.managementPort + "/application/metrics", "http://localhost:" + this.managementPort + "/actuator/metrics",
Map.class); Map.class);
assertThat(entity.getStatusCode()).isEqualTo(HttpStatus.UNAUTHORIZED); assertThat(entity.getStatusCode()).isEqualTo(HttpStatus.UNAUTHORIZED);
} }
@ -73,7 +73,7 @@ public class ManagementPortSampleActuatorApplicationTests {
public void testHealth() throws Exception { public void testHealth() throws Exception {
ResponseEntity<String> entity = new TestRestTemplate() ResponseEntity<String> entity = new TestRestTemplate()
.withBasicAuth("user", getPassword()).getForEntity( .withBasicAuth("user", getPassword()).getForEntity(
"http://localhost:" + this.managementPort + "/application/health", "http://localhost:" + this.managementPort + "/actuator/health",
String.class); String.class);
assertThat(entity.getStatusCode()).isEqualTo(HttpStatus.OK); assertThat(entity.getStatusCode()).isEqualTo(HttpStatus.OK);
assertThat(entity.getBody()).contains("\"status\":\"UP\""); assertThat(entity.getBody()).contains("\"status\":\"UP\"");

@ -94,7 +94,7 @@ public class SampleActuatorApplicationTests {
@SuppressWarnings("rawtypes") @SuppressWarnings("rawtypes")
ResponseEntity<Map> entity = this.restTemplate ResponseEntity<Map> entity = this.restTemplate
.withBasicAuth("user", getPassword()) .withBasicAuth("user", getPassword())
.getForEntity("/application/metrics", Map.class); .getForEntity("/actuator/metrics", Map.class);
assertThat(entity.getStatusCode()).isEqualTo(HttpStatus.OK); assertThat(entity.getStatusCode()).isEqualTo(HttpStatus.OK);
Map<String, Object> body = entity.getBody(); Map<String, Object> body = entity.getBody();
assertThat(body).containsKey("names"); assertThat(body).containsKey("names");
@ -107,7 +107,7 @@ public class SampleActuatorApplicationTests {
@SuppressWarnings("rawtypes") @SuppressWarnings("rawtypes")
ResponseEntity<Map> entity = this.restTemplate ResponseEntity<Map> entity = this.restTemplate
.withBasicAuth("user", getPassword()) .withBasicAuth("user", getPassword())
.getForEntity("/application/env", Map.class); .getForEntity("/actuator/env", Map.class);
assertThat(entity.getStatusCode()).isEqualTo(HttpStatus.OK); assertThat(entity.getStatusCode()).isEqualTo(HttpStatus.OK);
@SuppressWarnings("unchecked") @SuppressWarnings("unchecked")
Map<String, Object> body = entity.getBody(); Map<String, Object> body = entity.getBody();
@ -118,7 +118,7 @@ public class SampleActuatorApplicationTests {
public void testHealth() throws Exception { public void testHealth() throws Exception {
ResponseEntity<String> entity = this.restTemplate ResponseEntity<String> entity = this.restTemplate
.withBasicAuth("user", getPassword()) .withBasicAuth("user", getPassword())
.getForEntity("/application/health", String.class); .getForEntity("/actuator/health", String.class);
assertThat(entity.getStatusCode()).isEqualTo(HttpStatus.OK); assertThat(entity.getStatusCode()).isEqualTo(HttpStatus.OK);
assertThat(entity.getBody()).contains("\"status\":\"UP\""); assertThat(entity.getBody()).contains("\"status\":\"UP\"");
assertThat(entity.getBody()).doesNotContain("\"hello\":\"1\""); assertThat(entity.getBody()).doesNotContain("\"hello\":\"1\"");
@ -128,7 +128,7 @@ public class SampleActuatorApplicationTests {
public void testInfo() throws Exception { public void testInfo() throws Exception {
ResponseEntity<String> entity = this.restTemplate ResponseEntity<String> entity = this.restTemplate
.withBasicAuth("user", getPassword()) .withBasicAuth("user", getPassword())
.getForEntity("/application/info", String.class); .getForEntity("/actuator/info", String.class);
assertThat(entity.getStatusCode()).isEqualTo(HttpStatus.OK); assertThat(entity.getStatusCode()).isEqualTo(HttpStatus.OK);
assertThat(entity.getBody()) assertThat(entity.getBody())
.contains("\"artifact\":\"spring-boot-sample-actuator\""); .contains("\"artifact\":\"spring-boot-sample-actuator\"");
@ -169,7 +169,7 @@ public class SampleActuatorApplicationTests {
@SuppressWarnings("rawtypes") @SuppressWarnings("rawtypes")
ResponseEntity<Map> entity = this.restTemplate ResponseEntity<Map> entity = this.restTemplate
.withBasicAuth("user", getPassword()) .withBasicAuth("user", getPassword())
.getForEntity("/application/trace", Map.class); .getForEntity("/actuator/trace", Map.class);
assertThat(entity.getStatusCode()).isEqualTo(HttpStatus.OK); assertThat(entity.getStatusCode()).isEqualTo(HttpStatus.OK);
Map<String, Object> body = entity.getBody(); Map<String, Object> body = entity.getBody();
Map<String, Object> trace = ((List<Map<String, Object>>) body.get("traces")) Map<String, Object> trace = ((List<Map<String, Object>>) body.get("traces"))
@ -183,11 +183,11 @@ public class SampleActuatorApplicationTests {
@SuppressWarnings("unchecked") @SuppressWarnings("unchecked")
public void traceWithParameterMap() throws Exception { public void traceWithParameterMap() throws Exception {
this.restTemplate.withBasicAuth("user", getPassword()) this.restTemplate.withBasicAuth("user", getPassword())
.getForEntity("/application/health?param1=value1", String.class); .getForEntity("/actuator/health?param1=value1", String.class);
@SuppressWarnings("rawtypes") @SuppressWarnings("rawtypes")
ResponseEntity<Map> entity = this.restTemplate ResponseEntity<Map> entity = this.restTemplate
.withBasicAuth("user", getPassword()) .withBasicAuth("user", getPassword())
.getForEntity("/application/trace", Map.class); .getForEntity("/actuator/trace", Map.class);
assertThat(entity.getStatusCode()).isEqualTo(HttpStatus.OK); assertThat(entity.getStatusCode()).isEqualTo(HttpStatus.OK);
Map<String, Object> body = entity.getBody(); Map<String, Object> body = entity.getBody();
Map<String, Object> trace = ((List<Map<String, Object>>) body.get("traces")) Map<String, Object> trace = ((List<Map<String, Object>>) body.get("traces"))
@ -215,7 +215,7 @@ public class SampleActuatorApplicationTests {
@SuppressWarnings("rawtypes") @SuppressWarnings("rawtypes")
ResponseEntity<Map> entity = this.restTemplate ResponseEntity<Map> entity = this.restTemplate
.withBasicAuth("user", getPassword()) .withBasicAuth("user", getPassword())
.getForEntity("/application/beans", Map.class); .getForEntity("/actuator/beans", Map.class);
assertThat(entity.getStatusCode()).isEqualTo(HttpStatus.OK); assertThat(entity.getStatusCode()).isEqualTo(HttpStatus.OK);
assertThat(entity.getBody()).containsOnlyKeys("beans", "parent", "contextId"); assertThat(entity.getBody()).containsOnlyKeys("beans", "parent", "contextId");
assertThat(((String) entity.getBody().get("contextId"))) assertThat(((String) entity.getBody().get("contextId")))
@ -228,7 +228,7 @@ public class SampleActuatorApplicationTests {
@SuppressWarnings("rawtypes") @SuppressWarnings("rawtypes")
ResponseEntity<Map> entity = this.restTemplate ResponseEntity<Map> entity = this.restTemplate
.withBasicAuth("user", getPassword()) .withBasicAuth("user", getPassword())
.getForEntity("/application/configprops", Map.class); .getForEntity("/actuator/configprops", Map.class);
assertThat(entity.getStatusCode()).isEqualTo(HttpStatus.OK); assertThat(entity.getStatusCode()).isEqualTo(HttpStatus.OK);
Map<String, Object> body = entity.getBody(); Map<String, Object> body = entity.getBody();
assertThat((Map<String, Object>) body.get("beans")) assertThat((Map<String, Object>) body.get("beans"))

@ -61,7 +61,7 @@ public class ServletPathSampleActuatorApplicationTests {
public void testHealth() throws Exception { public void testHealth() throws Exception {
ResponseEntity<String> entity = this.restTemplate ResponseEntity<String> entity = this.restTemplate
.withBasicAuth("user", getPassword()) .withBasicAuth("user", getPassword())
.getForEntity("/spring/application/health", String.class); .getForEntity("/spring/actuator/health", String.class);
assertThat(entity.getStatusCode()).isEqualTo(HttpStatus.OK); assertThat(entity.getStatusCode()).isEqualTo(HttpStatus.OK);
assertThat(entity.getBody()).contains("\"status\":\"UP\""); assertThat(entity.getBody()).contains("\"status\":\"UP\"");
} }

@ -61,7 +61,7 @@ public class ShutdownSampleActuatorApplicationTests {
@SuppressWarnings("rawtypes") @SuppressWarnings("rawtypes")
ResponseEntity<Map> entity = this.restTemplate ResponseEntity<Map> entity = this.restTemplate
.withBasicAuth("user", getPassword()) .withBasicAuth("user", getPassword())
.postForEntity("/application/shutdown", null, Map.class); .postForEntity("/actuator/shutdown", null, Map.class);
assertThat(entity.getStatusCode()).isEqualTo(HttpStatus.OK); assertThat(entity.getStatusCode()).isEqualTo(HttpStatus.OK);
@SuppressWarnings("unchecked") @SuppressWarnings("unchecked")
Map<String, Object> body = entity.getBody(); Map<String, Object> body = entity.getBody();

@ -2,7 +2,7 @@
This sample demonstrates the flyway auto-configuration support. 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`) 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 so that you can review the state of the database (the default jdbc url is

@ -60,8 +60,8 @@ public class SampleJerseyApplicationTests {
@Test @Test
public void actuatorStatus() { public void actuatorStatus() {
ResponseEntity<String> entity = this.restTemplate ResponseEntity<String> entity = this.restTemplate.getForEntity("/actuator/health",
.getForEntity("/application/health", String.class); String.class);
assertThat(entity.getStatusCode()).isEqualTo(HttpStatus.OK); assertThat(entity.getStatusCode()).isEqualTo(HttpStatus.OK);
assertThat(entity.getBody()).isEqualTo("{\"status\":\"UP\"}"); assertThat(entity.getBody()).isEqualTo("{\"status\":\"UP\"}");
} }

@ -2,7 +2,7 @@
This sample demonstrates the liquibase auto-configuration support. 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. scripts.
This sample also enables the H2 console (at `http://localhost:8080/h2-console`) This sample also enables the H2 console (at `http://localhost:8080/h2-console`)

@ -48,7 +48,7 @@ public class SampleSecureWebFluxApplicationTests {
@Test @Test
public void actuatorsSecureByDefault() { 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(); .exchange().expectStatus().isUnauthorized();
} }
@ -61,7 +61,7 @@ public class SampleSecureWebFluxApplicationTests {
@Test @Test
public void actuatorsAccessibleOnLogin() { 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() .header("Authorization", "basic " + getBasicAuth()).exchange()
.expectBody(String.class).isEqualTo("{\"status\":\"UP\"}"); .expectBody(String.class).isEqualTo("{\"status\":\"UP\"}");
} }

@ -105,7 +105,7 @@ public class SampleMethodSecurityApplicationTests {
public void testManagementProtected() throws Exception { public void testManagementProtected() throws Exception {
HttpHeaders headers = new HttpHeaders(); HttpHeaders headers = new HttpHeaders();
headers.setAccept(Arrays.asList(MediaType.APPLICATION_JSON)); headers.setAccept(Arrays.asList(MediaType.APPLICATION_JSON));
ResponseEntity<String> entity = this.restTemplate.exchange("/application/beans", ResponseEntity<String> entity = this.restTemplate.exchange("/actuator/beans",
HttpMethod.GET, new HttpEntity<Void>(headers), String.class); HttpMethod.GET, new HttpEntity<Void>(headers), String.class);
assertThat(entity.getStatusCode()).isEqualTo(HttpStatus.UNAUTHORIZED); assertThat(entity.getStatusCode()).isEqualTo(HttpStatus.UNAUTHORIZED);
} }
@ -117,7 +117,7 @@ public class SampleMethodSecurityApplicationTests {
this.restTemplate.getRestTemplate().getInterceptors().add(basicAuthInterceptor); this.restTemplate.getRestTemplate().getInterceptors().add(basicAuthInterceptor);
try { try {
ResponseEntity<String> entity = this.restTemplate ResponseEntity<String> entity = this.restTemplate
.getForEntity("/application/beans", String.class); .getForEntity("/actuator/beans", String.class);
assertThat(entity.getStatusCode()).isEqualTo(HttpStatus.OK); assertThat(entity.getStatusCode()).isEqualTo(HttpStatus.OK);
} }
finally { finally {

@ -55,7 +55,7 @@ public class SampleWebFluxApplicationTests {
@Test @Test
public void testActuatorStatus() { 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() .exchange().expectStatus().isOk().expectBody()
.json("{\"status\":\"UP\"}"); .json("{\"status\":\"UP\"}");
} }

Loading…
Cancel
Save