Search in sources :

Example 1 with EndpointMBeanExporter

use of org.springframework.boot.actuate.endpoint.jmx.EndpointMBeanExporter in project spring-boot by spring-projects.

the class EndpointMBeanExportAutoConfiguration method endpointMBeanExporter.

@Bean
public EndpointMBeanExporter endpointMBeanExporter(MBeanServer server) {
    EndpointMBeanExporter mbeanExporter = new EndpointMBeanExporter(this.objectMapper);
    String domain = this.properties.getDomain();
    if (StringUtils.hasText(domain)) {
        mbeanExporter.setDomain(domain);
    }
    mbeanExporter.setServer(server);
    mbeanExporter.setEnsureUniqueRuntimeObjectNames(this.properties.isUniqueNames());
    mbeanExporter.setObjectNameStaticProperties(this.properties.getStaticNames());
    return mbeanExporter;
}
Also used : EndpointMBeanExporter(org.springframework.boot.actuate.endpoint.jmx.EndpointMBeanExporter) ConditionalOnBean(org.springframework.boot.autoconfigure.condition.ConditionalOnBean) ConditionalOnMissingBean(org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean) Bean(org.springframework.context.annotation.Bean)

Aggregations

EndpointMBeanExporter (org.springframework.boot.actuate.endpoint.jmx.EndpointMBeanExporter)1 ConditionalOnBean (org.springframework.boot.autoconfigure.condition.ConditionalOnBean)1 ConditionalOnMissingBean (org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean)1 Bean (org.springframework.context.annotation.Bean)1