@Test
public void testRegistrationTwoEndpoints() throws Exception {
this.context = new GenericApplicationContext();
this.context.registerBeanDefinition("endpointMbeanExporter",
new RootBeanDefinition(EndpointMBeanExporter.class));
this.context.registerBeanDefinition("endpoint1",
new RootBeanDefinition(TestEndpoint.class));
this.context.registerBeanDefinition("endpoint2",
new RootBeanDefinition(TestEndpoint.class));
this.context.refresh();
MBeanExporter mbeanExporter = this.context.getBean(EndpointMBeanExporter.class);
assertThat(mbeanExporter.getServer()
.getMBeanInfo(getObjectName("endpoint1", this.context))).isNotNull();
assertThat(mbeanExporter.getServer()
.getMBeanInfo(getObjectName("endpoint2", this.context))).isNotNull();
}
EndpointMBeanExporterTests.java 文件源码
java
阅读 26
收藏 0
点赞 0
评论 0
项目:spring-boot-concourse
作者:
评论列表
文章目录