Spring Cloud Config 使用之后,无法启动问题
程序员文章站
2024-03-20 21:49:28
...
@EnableMBeanExport
@Bean
public IntegrationMBeanExporter integrationMbeanExporter(@Value("spring.jmx.default-domain") String domain, MBeanServer mBeanServer) {
IntegrationMBeanExporter exporter = new IntegrationMBeanExporter();
exporter.setDefaultDomain(domain);
exporter.setServer(mBeanServer);
return exporter;
}
@Bean
@Primary
public AnnotationMBeanExporter mbeanExporter(ObjectNamingStrategy namingStrategy, MBeanServer mBeanServer) {
AnnotationMBeanExporter exporter = new AnnotationMBeanExporter();
exporter.setRegistrationPolicy(RegistrationPolicy.FAIL_ON_EXISTING);
exporter.setNamingStrategy(namingStrategy);
exporter.setServer(mBeanServer);
return exporter;
}
上一篇: 利用python爬取新冠肺炎疫情实时数据+可视化展示
下一篇: MySql主从复制