@Bean DiskSpaceHealthIndicator diskSpaceHealthIndicator(@Value("${health.disk.threshold}") long threshold) { DiskSpaceHealthIndicatorProperties diskSpaceHealthIndicatorProperties = new DiskSpaceHealthIndicatorProperties(); diskSpaceHealthIndicatorProperties.setThreshold(threshold); return new DiskSpaceHealthIndicator(diskSpaceHealthIndicatorProperties); }
@Bean @ConditionalOnMissingBean(name = "diskSpaceHealthIndicator") public DiskSpaceHealthIndicator diskSpaceHealthIndicator( DiskSpaceHealthIndicatorProperties properties) { return new DiskSpaceHealthIndicator(properties); }
@Bean public DiskSpaceHealthIndicatorProperties diskSpaceHealthIndicatorProperties() { return new DiskSpaceHealthIndicatorProperties(); }