Java 类org.springframework.boot.actuate.health.DiskSpaceHealthIndicator 实例源码

项目:document-management-store-app    文件:HealthCheckConfiguration.java   
@Bean
DiskSpaceHealthIndicator diskSpaceHealthIndicator(@Value("${health.disk.threshold}") long threshold) {
    DiskSpaceHealthIndicatorProperties diskSpaceHealthIndicatorProperties =
            new DiskSpaceHealthIndicatorProperties();
    diskSpaceHealthIndicatorProperties.setThreshold(threshold);
    return new DiskSpaceHealthIndicator(diskSpaceHealthIndicatorProperties);
}
项目:https-github.com-g0t4-jenkins2-course-spring-boot    文件:HealthIndicatorAutoConfigurationTests.java   
@Test
public void defaultHealthIndicatorsDisabledButOne() {
    this.context.register(HealthIndicatorAutoConfiguration.class,
            ManagementServerProperties.class);
    EnvironmentTestUtils.addEnvironment(this.context,
            "management.health.defaults.enabled:false",
            "management.health.diskspace.enabled:true");
    this.context.refresh();
    Map<String, HealthIndicator> beans = this.context
            .getBeansOfType(HealthIndicator.class);
    assertThat(beans).hasSize(1);
    assertThat(beans.values().iterator().next().getClass())
            .isEqualTo(DiskSpaceHealthIndicator.class);
}
项目:https-github.com-g0t4-jenkins2-course-spring-boot    文件:HealthIndicatorAutoConfigurationTests.java   
@Test
public void diskSpaceHealthIndicator() {
    this.context.register(HealthIndicatorAutoConfiguration.class);
    this.context.refresh();
    Map<String, HealthIndicator> beans = this.context
            .getBeansOfType(HealthIndicator.class);
    assertThat(beans).hasSize(1);
    assertThat(beans.values().iterator().next().getClass())
            .isEqualTo(DiskSpaceHealthIndicator.class);
}
项目:spring-boot-concourse    文件:HealthIndicatorAutoConfigurationTests.java   
@Test
public void defaultHealthIndicatorsDisabledButOne() {
    this.context.register(HealthIndicatorAutoConfiguration.class,
            ManagementServerProperties.class);
    EnvironmentTestUtils.addEnvironment(this.context,
            "management.health.defaults.enabled:false",
            "management.health.diskspace.enabled:true");
    this.context.refresh();
    Map<String, HealthIndicator> beans = this.context
            .getBeansOfType(HealthIndicator.class);
    assertThat(beans).hasSize(1);
    assertThat(beans.values().iterator().next().getClass())
            .isEqualTo(DiskSpaceHealthIndicator.class);
}
项目:spring-boot-concourse    文件:HealthIndicatorAutoConfigurationTests.java   
@Test
public void diskSpaceHealthIndicator() {
    this.context.register(HealthIndicatorAutoConfiguration.class);
    this.context.refresh();
    Map<String, HealthIndicator> beans = this.context
            .getBeansOfType(HealthIndicator.class);
    assertThat(beans).hasSize(1);
    assertThat(beans.values().iterator().next().getClass())
            .isEqualTo(DiskSpaceHealthIndicator.class);
}
项目:contestparser    文件:HealthIndicatorAutoConfigurationTests.java   
@Test
public void defaultHealthIndicatorsDisabledButOne() {
    this.context.register(HealthIndicatorAutoConfiguration.class,
            ManagementServerProperties.class);
    EnvironmentTestUtils.addEnvironment(this.context,
            "management.health.defaults.enabled:false",
            "management.health.diskspace.enabled:true");
    this.context.refresh();
    Map<String, HealthIndicator> beans = this.context
            .getBeansOfType(HealthIndicator.class);
    assertEquals(1, beans.size());
    assertEquals(DiskSpaceHealthIndicator.class,
            beans.values().iterator().next().getClass());
}
项目:contestparser    文件:HealthIndicatorAutoConfigurationTests.java   
@Test
public void diskSpaceHealthIndicator() {
    this.context.register(HealthIndicatorAutoConfiguration.class);
    this.context.refresh();
    Map<String, HealthIndicator> beans = this.context
            .getBeansOfType(HealthIndicator.class);
    assertEquals(1, beans.size());
    assertEquals(DiskSpaceHealthIndicator.class,
            beans.values().iterator().next().getClass());
}
项目:https-github.com-g0t4-jenkins2-course-spring-boot    文件:HealthIndicatorAutoConfiguration.java   
@Bean
@ConditionalOnMissingBean(name = "diskSpaceHealthIndicator")
public DiskSpaceHealthIndicator diskSpaceHealthIndicator(
        DiskSpaceHealthIndicatorProperties properties) {
    return new DiskSpaceHealthIndicator(properties);
}
项目:spring-boot-concourse    文件:HealthIndicatorAutoConfiguration.java   
@Bean
@ConditionalOnMissingBean(name = "diskSpaceHealthIndicator")
public DiskSpaceHealthIndicator diskSpaceHealthIndicator(
        DiskSpaceHealthIndicatorProperties properties) {
    return new DiskSpaceHealthIndicator(properties);
}
项目:contestparser    文件:HealthIndicatorAutoConfiguration.java   
@Bean
@ConditionalOnMissingBean(name = "diskSpaceHealthIndicator")
public DiskSpaceHealthIndicator diskSpaceHealthIndicator(
        DiskSpaceHealthIndicatorProperties properties) {
    return new DiskSpaceHealthIndicator(properties);
}