@AutoConfiguration @ConditionalOnClass(value=org.springframework.jmx.export.MBeanExporter.class) @ConditionalOnProperty(prefix="spring.jmx", name="enabled", havingValue="true") public class JmxAutoConfiguration extends Object
Auto-configuration
to enable/disable Spring's
@EnableMBeanExport
mechanism based on configuration
properties.
To enable auto export of annotation beans set spring.jmx.enabled: true
.
Constructor and Description |
---|
JmxAutoConfiguration(Environment environment) |
Modifier and Type | Method and Description |
---|---|
AnnotationMBeanExporter |
mbeanExporter(ObjectNamingStrategy namingStrategy,
BeanFactory beanFactory) |
MBeanServer |
mbeanServer() |
ParentAwareNamingStrategy |
objectNamingStrategy() |
public JmxAutoConfiguration(Environment environment)
@Bean @Primary @ConditionalOnMissingBean(value=org.springframework.jmx.export.MBeanExporter.class, search=CURRENT) public AnnotationMBeanExporter mbeanExporter(ObjectNamingStrategy namingStrategy, BeanFactory beanFactory)
@Bean @ConditionalOnMissingBean(value=org.springframework.jmx.export.naming.ObjectNamingStrategy.class, search=CURRENT) public ParentAwareNamingStrategy objectNamingStrategy()
@Bean @ConditionalOnMissingBean public MBeanServer mbeanServer()