Class JmxAutoConfiguration
- java.lang.Object
- org.springframework.boot.autoconfigure.jmx.JmxAutoConfiguration
- All Implemented Interfaces:
org.springframework.beans.factory.Aware,org.springframework.beans.factory.BeanFactoryAware,org.springframework.context.EnvironmentAware
@Configuration @ConditionalOnClass(org.springframework.jmx.export.MBeanExporter.class) @ConditionalOnProperty(prefix="spring.jmx", name="enabled", havingValue="true", matchIfMissing=true) public class JmxAutoConfiguration extends Object implements org.springframework.context.EnvironmentAware, org.springframework.beans.factory.BeanFactoryAware
Auto-configurationto enable/disable Spring'sEnableMBeanExportmechanism based on configuration properties.To disable auto export of annotation beans set
spring.jmx.enabled: false.
Constructor Summary
Constructors Constructor Description JmxAutoConfiguration()
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.springframework.jmx.export.annotation.AnnotationMBeanExportermbeanExporter(org.springframework.jmx.export.naming.ObjectNamingStrategy namingStrategy)MBeanServermbeanServer()ParentAwareNamingStrategyobjectNamingStrategy()voidsetBeanFactory(org.springframework.beans.factory.BeanFactory beanFactory)voidsetEnvironment(org.springframework.core.env.Environment environment)
Constructor Detail
JmxAutoConfiguration
public JmxAutoConfiguration()
Method Detail
setEnvironment
public void setEnvironment(org.springframework.core.env.Environment environment)
- Specified by:
setEnvironmentin interfaceorg.springframework.context.EnvironmentAware
setBeanFactory
public void setBeanFactory(org.springframework.beans.factory.BeanFactory beanFactory) throws org.springframework.beans.BeansException
- Specified by:
setBeanFactoryin interfaceorg.springframework.beans.factory.BeanFactoryAware- Throws:
org.springframework.beans.BeansException
mbeanExporter
@Bean @Primary @ConditionalOnMissingBean(value=org.springframework.jmx.export.MBeanExporter.class, search=CURRENT) public org.springframework.jmx.export.annotation.AnnotationMBeanExporter mbeanExporter(org.springframework.jmx.export.naming.ObjectNamingStrategy namingStrategy)
objectNamingStrategy
@Bean @ConditionalOnMissingBean(value=org.springframework.jmx.export.naming.ObjectNamingStrategy.class, search=CURRENT) public ParentAwareNamingStrategy objectNamingStrategy()
mbeanServer
@Bean @ConditionalOnMissingBean(javax.management.MBeanServer.class) public MBeanServer mbeanServer()