下面列出了怎么用org.springframework.boot.actuate.autoconfigure.health.HealthEndpointAutoConfiguration的API类实例代码及写法,或者点击链接到github查看源代码。
@Test
public void beansCreatedNormally() {
applicationContextRunner
.withConfiguration(
AutoConfigurations.of(HealthEndpointAutoConfiguration.class))
.withPropertyValues("management.endpoints.web.exposure.include=features")
.run(ctxt -> {
then(ctxt.getBean(DiscoveryClientHealthIndicator.class)).isNotNull();
then(ctxt.getBean(DiscoveryCompositeHealthContributor.class))
.isNotNull();
then(ctxt.getBean(FeaturesEndpoint.class)).isNotNull();
then(ctxt.getBeansOfType(HasFeatures.class).values()).isNotEmpty();
});
}