Is it possible to disable the export for MBeans in Spring Integration via a configuration setting?
I'm using Spring Boot with Spring Integration. I've disable JMX in Spring Boot via
endpoints.jmx.enabled: false
spring.jmx.enabled: false
However, I want to see some statistics about some Spring Integration Channels and Enpoints, so I added @EnableIntegration
and @EnableIntegrationMBeanExport
. I can see the MBeans now.
Is it possible to later disable the export of Spring Integration MBeans via some setting the application.yml (similar to how it is done in Spring Boot)?
There is no such a specific property for the Spring Integration JMX. It is fully tied with the common JMX configuration for the whole Boot application.
If you are fine with the @EnableIntegrationMBeanExport
, consider to introduce custom @ConfigurationProperties
and perform similar @ConditionalOnProperty
on that @Configuration
which adds that @EnableIntegrationMBeanExport
.