spring-bootjmxspring-boot-actuatorspring-jmx

What is the exact purpose for spring.jmx.enabled?


For Spring Boot (v2.4.2), in the Monitoring and Management over JMX section indicates:

Java Management Extensions (JMX) provide a standard mechanism to monitor and manage applications. 
By default, this feature is not enabled and can be turned on by setting the configuration property 
spring.jmx.enabled to true. Spring Boot exposes management endpoints as JMX MBeans under
the org.springframework.boot domain by default.

Therefore spring.jmx.enabled is false by default.

I don't understand this behavior, because for a quick SB app based on web with dev tools and actuator and even when is declared spring.jmx.enabled with false with and without Dev Tools and Actuator dependencies I always can see org.springframework.boot domain as follows:

enter image description here

enter image description here

enter image description here

enter image description here

Observation: I played around with and without Dev Tools and Actuator because I assumed that any of them were overriding internally spring.jmx.enabled to true, but it is not true as I confirmed for the latest scenario

So what should be the explicit difference to observe when spring.jmx.enabled is false and true? In the scenario shared above always appears the org.springframework.boot domain and I am able to access for all the scenarios shown above the management methods. I though that spring.jmx.enabled with false should not expose the org.springframework.boot domain from the beginning.


Solution

  • When you launch an application in STS it sets the spring.application.admin.enabled property to true. This enables MBeans in the org.springframework.boot domain that STS uses to manage the application and to provide insights into its functionality using information retrieved from the Actuator endpoints exposed over JMX.