Skip to content

Commit abf5e63

Browse files
kuldeepsidhu88mbhave
authored andcommitted
Remove redundancy from actuator documentation
See gh-14206
1 parent 6c865f9 commit abf5e63

File tree

1 file changed

+32
-31
lines changed

1 file changed

+32
-31
lines changed

spring-boot-project/spring-boot-docs/src/main/asciidoc/production-ready-features.adoc

Lines changed: 32 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -461,25 +461,6 @@ disabled to prevent the possibility of a clash with other mappings.
461461

462462

463463

464-
[[production-ready-endpoints-custom-mapping]]
465-
=== Actuator Web Endpoint Paths
466-
By default, endpoints are exposed over HTTP under the `/actuator` path by using the ID of
467-
the endpoint. For example, the `beans` endpoint is exposed under `/actuator/beans`. If you
468-
want to map endpoints to a different path, you can use the
469-
`management.endpoints.web.path-mapping` property. Also, if you want change the base path,
470-
you can use `management.endpoints.web.base-path`.
471-
472-
The following example remaps `/actuator/health` to `/healthcheck`:
473-
474-
.application.properties
475-
[source,properties,indent=0]
476-
----
477-
management.endpoints.web.base-path=/
478-
management.endpoints.web.path-mapping.health=healthcheck
479-
----
480-
481-
482-
483464
[[production-ready-endpoints-cors]]
484465
=== CORS Support
485466
https://en.wikipedia.org/wiki/Cross-origin_resource_sharing[Cross-origin resource sharing]
@@ -1059,20 +1040,11 @@ additional entry:
10591040

10601041

10611042

1062-
[[production-ready-monitoring]]
1063-
== Monitoring and Management over HTTP
1064-
If you are developing a web application, Spring Boot Actuator auto-configures all
1065-
enabled endpoints to be exposed over HTTP. The default convention is to use the `id` of
1066-
the endpoint with a prefix of `/actuator` as the URL path. For example, `health` is
1067-
exposed as `/actuator/health`.
1068-
1069-
TIP: Actuator is supported natively with Spring MVC, Spring WebFlux, and Jersey.
1070-
1071-
1072-
10731043
[[production-ready-customizing-management-server-context-path]]
10741044
=== Customizing the Management Endpoint Paths
1075-
Sometimes, it is useful to customize the prefix for the management endpoints. For
1045+
Sometimes, it is useful to customize the prefix for the management endpoints. By default,
1046+
endpoints are exposed over HTTP under the `/actuator` path by using the ID of
1047+
the endpoint. For
10761048
example, your application might already use `/actuator` for another purpose. You can
10771049
use the `management.endpoints.web.base-path` property to change the prefix for your
10781050
management endpoint, as shown in the following example:
@@ -1092,7 +1064,17 @@ different HTTP port>>, `management.endpoints.web.base-path` is relative to
10921064
`management.endpoints.web.base-path` is relative to
10931065
`management.server.servlet.context-path`.
10941066

1067+
If you want to map endpoints to a different path, you can use the
1068+
`management.endpoints.web.path-mapping` property.
1069+
1070+
The following example remaps `/actuator/health` to `/healthcheck`:
10951071

1072+
.application.properties
1073+
[source,properties,indent=0]
1074+
----
1075+
management.endpoints.web.base-path=/
1076+
management.endpoints.web.path-mapping.health=healthcheck
1077+
----
10961078

10971079
[[production-ready-customizing-management-server-port]]
10981080
=== Customizing the Management Server Port
@@ -1175,7 +1157,26 @@ If you do not want to expose endpoints over HTTP, you can set the management por
11751157
management.server.port=-1
11761158
----
11771159

1160+
Above can be achieved using the property `management.endpoints.web.exposure.exclude` as well, as shown in
1161+
following example:
1162+
1163+
[source,properties,indent=0]
1164+
----
1165+
management.endpoints.web.exposure.exclude=*
1166+
----
1167+
1168+
`*` can be used to select all endpoints.
1169+
1170+
If you want to disable HTTP endpoints selectively, configure the list of endpoints IDs to be disabled in
1171+
`management.endpoints.web.exposure.exclude` property
1172+
as shown in following example:
1173+
1174+
[source,properties,indent=0]
1175+
----
1176+
management.endpoints.web.exposure.exclude=env,beans
1177+
----
11781178

1179+
`env` and `beans` endpoints will not be exposed over HTTP.
11791180

11801181
[[production-ready-jmx]]
11811182
== Monitoring and Management over JMX

0 commit comments

Comments
 (0)