@Configuration @ConditionalOnClass(value=org.springframework.jmx.export.MBeanExporter.class) public class JmxAutoConfiguration extends Object implements EnvironmentAware, BeanFactoryAware
Auto-configuration
to enable/disable Spring's
EnableMBeanExport
mechanism based on configuration properties.
To disable auto export of annotation beans set spring.jmx.enabled: false
.
Constructor and Description |
---|
JmxAutoConfiguration() |
Modifier and Type | Method and Description |
---|---|
AnnotationMBeanExporter |
mbeanExporter(ObjectNamingStrategy namingStrategy) |
MBeanServer |
mbeanServer() |
ParentAwareNamingStrategy |
objectNamingStrategy() |
void |
setBeanFactory(BeanFactory beanFactory) |
void |
setEnvironment(Environment environment) |
public void setEnvironment(Environment environment)
setEnvironment
in interface EnvironmentAware
public void setBeanFactory(BeanFactory beanFactory) throws BeansException
setBeanFactory
in interface BeanFactoryAware
BeansException
@Bean @ConditionalOnMissingBean(value=org.springframework.jmx.export.MBeanExporter.class, search=CURRENT) public AnnotationMBeanExporter mbeanExporter(ObjectNamingStrategy namingStrategy)
@Bean @ConditionalOnMissingBean(value=org.springframework.jmx.export.naming.ObjectNamingStrategy.class, search=CURRENT) public ParentAwareNamingStrategy objectNamingStrategy()
@Bean @ConditionalOnMissingBean(value=javax.management.MBeanServer.class) public MBeanServer mbeanServer()
Copyright © 2015 Pivotal Software, Inc.. All rights reserved.