Reinstate JMX customizations of Endpoints ObjectName
This commit restores the configuration properties used to configure how the ObjectName of an endpoint is generated. For consistency, those properties have been renamed to `management.jmx` Closes gh-10005
This commit is contained in:
@@ -1119,17 +1119,6 @@ content into your application; rather pick only the properties that you need.
|
||||
endpoints.cors.exposed-headers= # Comma-separated list of headers to include in a response.
|
||||
endpoints.cors.max-age=1800 # How long, in seconds, the response from a pre-flight request can be cached by clients.
|
||||
|
||||
# JMX ENDPOINT ({sc-spring-boot-actuator}/autoconfigure/EndpointMBeanExportProperties.{sc-ext}[EndpointMBeanExportProperties])
|
||||
endpoints.jmx.domain= # JMX domain name. Initialized with the value of 'spring.jmx.default-domain' if set.
|
||||
endpoints.jmx.enabled=true # Enable JMX export of all endpoints.
|
||||
endpoints.jmx.static-names= # Additional static properties to append to all ObjectNames of MBeans representing Endpoints.
|
||||
endpoints.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.
|
||||
management.jolokia.path=/jolokia # Path at which Jolokia will be available.
|
||||
|
||||
# MANAGEMENT HTTP SERVER ({sc-spring-boot-actuator}/autoconfigure/ManagementServerProperties.{sc-ext}[ManagementServerProperties])
|
||||
management.add-application-context-header=false # Add the "X-Application-Context" HTTP header in each response.
|
||||
management.address= # Network address that the management endpoints should bind to.
|
||||
@@ -1184,6 +1173,16 @@ 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.
|
||||
management.jolokia.path=/jolokia # Path at which Jolokia will be available.
|
||||
|
||||
# TRACING ({sc-spring-boot-actuator}/trace/TraceProperties.{sc-ext}[TraceProperties])
|
||||
management.trace.include=request-headers,response-headers,cookies,errors # Items to be included in the trace.
|
||||
|
||||
|
||||
@@ -734,10 +734,10 @@ under the `org.springframework.boot` domain.
|
||||
[[production-ready-custom-mbean-names]]
|
||||
=== Customizing MBean names
|
||||
The name of the MBean is usually generated from the `id` of the endpoint. For example
|
||||
the `health` endpoint is exposed as `org.springframework.boot/Endpoint/healthEndpoint`.
|
||||
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 `endpoints.jmx.unique-names` property
|
||||
names clash. To solve this problem you can set the `management.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
|
||||
@@ -745,20 +745,20 @@ example `application.properties`:
|
||||
|
||||
[source,properties,indent=0]
|
||||
----
|
||||
endpoints.jmx.domain=myapp
|
||||
endpoints.jmx.unique-names=true
|
||||
management.jmx.domain=com.example.myapp
|
||||
management.jmx.unique-names=true
|
||||
----
|
||||
|
||||
|
||||
|
||||
[[production-ready-disable-jmx-endpoints]]
|
||||
=== Disabling JMX endpoints
|
||||
If you don't want to expose endpoints over JMX you can set the `endpoints.jmx.enabled`
|
||||
If you don't want to expose endpoints over JMX you can set the `endpoints.all.jmx.enabled`
|
||||
property to `false`:
|
||||
|
||||
[source,properties,indent=0]
|
||||
----
|
||||
endpoints.jmx.enabled=false
|
||||
endpoints.all.jmx.enabled=false
|
||||
----
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user