All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.springframework.boot.actuate.autoconfigure.HealthIndicatorAutoConfigurationAfter Maven / Gradle / Ivy

package org.springframework.boot.actuate.autoconfigure;

import org.springframework.boot.actuate.health.HealthIndicator;
import org.springframework.boot.actuate.health.MountHealthIndicator;
import org.springframework.boot.actuate.health.MountHealthIndicatorProperties;
import org.springframework.boot.autoconfigure.AutoConfigureAfter;
import org.springframework.boot.autoconfigure.AutoConfigureBefore;
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
@ConditionalOnClass(org.springframework.boot.actuate.health.HealthIndicator.class)
@AutoConfigureBefore(EndpointAutoConfiguration.class)
@AutoConfigureAfter(HealthIndicatorAutoConfiguration.class)
public class HealthIndicatorAutoConfigurationAfter {
  @Configuration
  @ConditionalOnEnabledHealthIndicator("mount")
  public static class MountHealthIndicatorConfiguration {
    @Bean
    @ConditionalOnMissingBean(name = "mountHealthIndicator")
    public HealthIndicator mountHealthIndicator(MountHealthIndicatorProperties mountHealthIndicatorProperties) {
      return new MountHealthIndicator(mountHealthIndicatorProperties);
    }

    @Bean
    public MountHealthIndicatorProperties mountHealthIndicatorProperties() {
      return new MountHealthIndicatorProperties();
    }
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy