diff --git a/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/autoconfigure/endpoint/infrastructure/JmxEndpointExporterProperties.java b/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/autoconfigure/endpoint/infrastructure/JmxEndpointExporterProperties.java index c079a7e7df..ade8cb898b 100644 --- a/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/autoconfigure/endpoint/infrastructure/JmxEndpointExporterProperties.java +++ b/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/autoconfigure/endpoint/infrastructure/JmxEndpointExporterProperties.java @@ -28,7 +28,7 @@ import org.springframework.util.StringUtils; * @author Stephane Nicoll * @since 2.0.0 */ -@ConfigurationProperties("management.jmx") +@ConfigurationProperties("management.endpoints.jmx") public class JmxEndpointExporterProperties { /** diff --git a/spring-boot-docs/src/main/asciidoc/appendix-application-properties.adoc b/spring-boot-docs/src/main/asciidoc/appendix-application-properties.adoc index 74f6f81b50..379f471122 100644 --- a/spring-boot-docs/src/main/asciidoc/appendix-application-properties.adoc +++ b/spring-boot-docs/src/main/asciidoc/appendix-application-properties.adoc @@ -1238,6 +1238,11 @@ content into your application; rather pick only the properties that you need. management.endpoints.cors.exposed-headers= # Comma-separated list of headers to include in a response. management.endpoints.cors.max-age=1800 # How long, in seconds, the response from a pre-flight request can be cached by clients. + # ENDPOINTS JMX CONFIGURATION ({sc-spring-boot-actuator}/autoconfigure/endpoint.infrastructure/JmxEndpointExporterProperties.{sc-ext}[JmxEndpointExporterProperties]) + management.endpoints.jmx.domain=org.springframework.boot # Endpoints JMX domain name. Fallback to 'spring.jmx.default-domain' if set. + management.endpoints.jmx.static-names=false # Additional static properties to append to all ObjectNames of MBeans representing Endpoints. + management.endpoints.jmx.unique-names=false # Ensure that ObjectNames are modified in case of conflict. + # HEALTH INDICATORS management.health.db.enabled=true # Enable database health check. management.health.cassandra.enabled=true # Enable cassandra health check. @@ -1267,11 +1272,6 @@ content into your application; rather pick only the properties that you need. management.info.git.enabled=true # Enable git info. management.info.git.mode=simple # Mode to use to expose git information. - # JMX ENDPOINT ({sc-spring-boot-actuator}/autoconfigure/endpoint.infrastructure/JmxEndpointExporterProperties.{sc-ext}[JmxEndpointExporterProperties]) - management.jmx.domain=org.springframework.boot # Endpoints JMX domain name. Fallback to 'spring.jmx.default-domain' if set. - management.jmx.static-names=false # Additional static properties to append to all ObjectNames of MBeans representing Endpoints. - management.jmx.unique-names=false # Ensure that ObjectNames are modified in case of conflict. - # JOLOKIA ({sc-spring-boot-actuator}/autoconfigure/jolokia/JolokiaProperties.{sc-ext}[JolokiaProperties]) management.jolokia.config.*= # Jolokia settings. See the Jolokia manual for details. management.jolokia.enabled=true # Enable Jolokia. diff --git a/spring-boot-docs/src/main/asciidoc/production-ready-features.adoc b/spring-boot-docs/src/main/asciidoc/production-ready-features.adoc index ffc7237afa..4d26c45384 100644 --- a/spring-boot-docs/src/main/asciidoc/production-ready-features.adoc +++ b/spring-boot-docs/src/main/asciidoc/production-ready-features.adoc @@ -742,16 +742,16 @@ The name of the MBean is usually generated from the `id` of the endpoint. For ex the `health` endpoint is exposed as `org.springframework.boot:type=Endpoint,name=Health`. If your application contains more than one Spring `ApplicationContext` you may find that -names clash. To solve this problem you can set the `management.jmx.unique-names` property -to `true` so that MBean names are always unique. +names clash. To solve this problem you can set the `management.endpoints.jmx.unique-names` +property to `true` so that MBean names are always unique. You can also customize the JMX domain under which endpoints are exposed. Here is an example `application.properties`: [source,properties,indent=0] ---- - management.jmx.domain=com.example.myapp - management.jmx.unique-names=true + management.endpoints.jmx.domain=com.example.myapp + management.endpoints.jmx.unique-names=true ----