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-configuration
to enable/disable Spring'sEnableMBeanExport
mechanism 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.AnnotationMBeanExporter
mbeanExporter(org.springframework.jmx.export.naming.ObjectNamingStrategy namingStrategy)
MBeanServer
mbeanServer()
ParentAwareNamingStrategy
objectNamingStrategy()
void
setBeanFactory(org.springframework.beans.factory.BeanFactory beanFactory)
void
setEnvironment(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:
setEnvironment
in interfaceorg.springframework.context.EnvironmentAware
setBeanFactory
public void setBeanFactory(org.springframework.beans.factory.BeanFactory beanFactory) throws org.springframework.beans.BeansException
- Specified by:
setBeanFactory
in 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 public MBeanServer mbeanServer()