欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

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;
	}
相关标签: config