@Configuration @ConditionalOnClass(value=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'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 |
---|---|
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) |
public void setEnvironment(org.springframework.core.env.Environment environment)
setEnvironment
in interface org.springframework.context.EnvironmentAware
public void setBeanFactory(org.springframework.beans.factory.BeanFactory beanFactory) throws org.springframework.beans.BeansException
setBeanFactory
in interface org.springframework.beans.factory.BeanFactoryAware
org.springframework.beans.BeansException
@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)
@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 © 2018 Pivotal Software, Inc.. All rights reserved.