Java 类org.springframework.boot.actuate.endpoint.HealthEndpoint 实例源码

项目:https-github.com-g0t4-jenkins2-course-spring-boot    文件:EndpointAutoConfiguration.java   
@Bean
@ConditionalOnMissingBean
public HealthEndpoint healthEndpoint() {
    return new HealthEndpoint(
            this.healthAggregator == null ? new OrderedHealthAggregator()
                    : this.healthAggregator,
            this.healthIndicators == null
                    ? Collections.<String, HealthIndicator>emptyMap()
                    : this.healthIndicators);
}
项目:https-github.com-g0t4-jenkins2-course-spring-boot    文件:EndpointAutoConfigurationTests.java   
@Test
public void endpoints() throws Exception {
    load(EndpointAutoConfiguration.class);
    assertThat(this.context.getBean(BeansEndpoint.class)).isNotNull();
    assertThat(this.context.getBean(DumpEndpoint.class)).isNotNull();
    assertThat(this.context.getBean(EnvironmentEndpoint.class)).isNotNull();
    assertThat(this.context.getBean(HealthEndpoint.class)).isNotNull();
    assertThat(this.context.getBean(InfoEndpoint.class)).isNotNull();
    assertThat(this.context.getBean(MetricsEndpoint.class)).isNotNull();
    assertThat(this.context.getBean(ShutdownEndpoint.class)).isNotNull();
    assertThat(this.context.getBean(TraceEndpoint.class)).isNotNull();
    assertThat(this.context.getBean(RequestMappingEndpoint.class)).isNotNull();
}
项目:https-github.com-g0t4-jenkins2-course-spring-boot    文件:EndpointAutoConfigurationTests.java   
@Test
public void healthEndpoint() {
    load(EmbeddedDataSourceConfiguration.class, EndpointAutoConfiguration.class,
            HealthIndicatorAutoConfiguration.class);
    HealthEndpoint bean = this.context.getBean(HealthEndpoint.class);
    assertThat(bean).isNotNull();
    Health result = bean.invoke();
    assertThat(result).isNotNull();
    assertThat(result.getDetails().containsKey("db")).isTrue();
}
项目:https-github.com-g0t4-jenkins2-course-spring-boot    文件:EndpointAutoConfigurationTests.java   
@Test
public void healthEndpointWithDefaultHealthIndicator() {
    load(EndpointAutoConfiguration.class, HealthIndicatorAutoConfiguration.class);
    HealthEndpoint bean = this.context.getBean(HealthEndpoint.class);
    assertThat(bean).isNotNull();
    Health result = bean.invoke();
    assertThat(result).isNotNull();
}
项目:https-github.com-g0t4-jenkins2-course-spring-boot    文件:HealthMvcEndpointTests.java   
@Before
public void init() {
    this.endpoint = mock(HealthEndpoint.class);
    given(this.endpoint.isEnabled()).willReturn(true);
    this.mvc = new HealthMvcEndpoint(this.endpoint);
    this.environment = new MockEnvironment();
    this.mvc.setEnvironment(this.environment);
}
项目:spring-boot-concourse    文件:EndpointAutoConfiguration.java   
@Bean
@ConditionalOnMissingBean
public HealthEndpoint healthEndpoint() {
    return new HealthEndpoint(
            this.healthAggregator == null ? new OrderedHealthAggregator()
                    : this.healthAggregator,
            this.healthIndicators == null
                    ? Collections.<String, HealthIndicator>emptyMap()
                    : this.healthIndicators);
}
项目:spring-boot-concourse    文件:EndpointAutoConfigurationTests.java   
@Test
public void endpoints() throws Exception {
    load(EndpointAutoConfiguration.class);
    assertThat(this.context.getBean(BeansEndpoint.class)).isNotNull();
    assertThat(this.context.getBean(DumpEndpoint.class)).isNotNull();
    assertThat(this.context.getBean(EnvironmentEndpoint.class)).isNotNull();
    assertThat(this.context.getBean(HealthEndpoint.class)).isNotNull();
    assertThat(this.context.getBean(InfoEndpoint.class)).isNotNull();
    assertThat(this.context.getBean(MetricsEndpoint.class)).isNotNull();
    assertThat(this.context.getBean(ShutdownEndpoint.class)).isNotNull();
    assertThat(this.context.getBean(TraceEndpoint.class)).isNotNull();
    assertThat(this.context.getBean(RequestMappingEndpoint.class)).isNotNull();
}
项目:spring-boot-concourse    文件:EndpointAutoConfigurationTests.java   
@Test
public void healthEndpoint() {
    load(EmbeddedDataSourceConfiguration.class, EndpointAutoConfiguration.class,
            HealthIndicatorAutoConfiguration.class);
    HealthEndpoint bean = this.context.getBean(HealthEndpoint.class);
    assertThat(bean).isNotNull();
    Health result = bean.invoke();
    assertThat(result).isNotNull();
    assertThat(result.getDetails().containsKey("db")).isTrue();
}
项目:spring-boot-concourse    文件:EndpointAutoConfigurationTests.java   
@Test
public void healthEndpointWithDefaultHealthIndicator() {
    load(EndpointAutoConfiguration.class, HealthIndicatorAutoConfiguration.class);
    HealthEndpoint bean = this.context.getBean(HealthEndpoint.class);
    assertThat(bean).isNotNull();
    Health result = bean.invoke();
    assertThat(result).isNotNull();
}
项目:spring-boot-concourse    文件:HealthMvcEndpointTests.java   
@Before
public void init() {
    this.endpoint = mock(HealthEndpoint.class);
    given(this.endpoint.isEnabled()).willReturn(true);
    this.mvc = new HealthMvcEndpoint(this.endpoint);
    this.environment = new MockEnvironment();
    this.mvc.setEnvironment(this.environment);
}
项目:contestparser    文件:EndpointAutoConfigurationTests.java   
@Test
public void endpoints() throws Exception {
    load(EndpointAutoConfiguration.class);
    assertNotNull(this.context.getBean(BeansEndpoint.class));
    assertNotNull(this.context.getBean(DumpEndpoint.class));
    assertNotNull(this.context.getBean(EnvironmentEndpoint.class));
    assertNotNull(this.context.getBean(HealthEndpoint.class));
    assertNotNull(this.context.getBean(InfoEndpoint.class));
    assertNotNull(this.context.getBean(MetricsEndpoint.class));
    assertNotNull(this.context.getBean(ShutdownEndpoint.class));
    assertNotNull(this.context.getBean(TraceEndpoint.class));
    assertNotNull(this.context.getBean(RequestMappingEndpoint.class));
}
项目:contestparser    文件:EndpointAutoConfigurationTests.java   
@Test
public void healthEndpoint() {
    load(EmbeddedDataSourceConfiguration.class, EndpointAutoConfiguration.class,
            HealthIndicatorAutoConfiguration.class);
    HealthEndpoint bean = this.context.getBean(HealthEndpoint.class);
    assertNotNull(bean);
    Health result = bean.invoke();
    assertNotNull(result);
    assertTrue("Wrong result: " + result, result.getDetails().containsKey("db"));
}
项目:contestparser    文件:EndpointAutoConfigurationTests.java   
@Test
public void healthEndpointWithDefaultHealthIndicator() {
    load(EndpointAutoConfiguration.class, HealthIndicatorAutoConfiguration.class);
    HealthEndpoint bean = this.context.getBean(HealthEndpoint.class);
    assertNotNull(bean);
    Health result = bean.invoke();
    assertNotNull(result);
}
项目:contestparser    文件:HealthMvcEndpointTests.java   
@Before
public void init() {
    this.endpoint = mock(HealthEndpoint.class);
    given(this.endpoint.isEnabled()).willReturn(true);
    this.mvc = new HealthMvcEndpoint(this.endpoint);
    this.environment = new MockEnvironment();
    this.mvc.setEnvironment(this.environment);
}
项目:https-github.com-g0t4-jenkins2-course-spring-boot    文件:HealthMvcEndpoint.java   
public HealthMvcEndpoint(HealthEndpoint delegate) {
    this(delegate, true);
}
项目:https-github.com-g0t4-jenkins2-course-spring-boot    文件:HealthMvcEndpoint.java   
public HealthMvcEndpoint(HealthEndpoint delegate, boolean secure) {
    super(delegate);
    this.secure = secure;
    setupDefaultStatusMapping();
}
项目:spring-boot-concourse    文件:HealthMvcEndpoint.java   
public HealthMvcEndpoint(HealthEndpoint delegate) {
    this(delegate, true);
}
项目:spring-boot-concourse    文件:HealthMvcEndpoint.java   
public HealthMvcEndpoint(HealthEndpoint delegate, boolean secure) {
    super(delegate);
    this.secure = secure;
    setupDefaultStatusMapping();
}
项目:contestparser    文件:EndpointAutoConfiguration.java   
@Bean
@ConditionalOnMissingBean
public HealthEndpoint healthEndpoint() {
    return new HealthEndpoint(this.healthAggregator, this.healthIndicators);
}
项目:contestparser    文件:HealthMvcEndpoint.java   
public HealthMvcEndpoint(HealthEndpoint delegate) {
    this(delegate, true);
}
项目:contestparser    文件:HealthMvcEndpoint.java   
public HealthMvcEndpoint(HealthEndpoint delegate, boolean secure) {
    super(delegate);
    this.secure = secure;
    setupDefaultStatusMapping();
}
项目:iris    文件:ActuatorConfig.java   
@Bean
@Autowired
public HealthMvcEndpoint healthMvcEndpoint(HealthEndpoint delegate) {

    return new HealthMvcEndpoint(delegate, true);
}