cn.aradin.spring.actuator.starter.AradinActuatorAutoConfiguration Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of aradin-spring-actuator-starter Show documentation
Show all versions of aradin-spring-actuator-starter Show documentation
Actuator And Customized HealthCheck
The newest version!
package cn.aradin.spring.actuator.starter;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import cn.aradin.spring.actuator.starter.extension.DefaultOfflineHandler;
import cn.aradin.spring.actuator.starter.extension.DefaultOnlineHandler;
import cn.aradin.spring.actuator.starter.extension.IOfflineHandler;
import cn.aradin.spring.actuator.starter.extension.IOnlineHandler;
import cn.aradin.spring.actuator.starter.properties.ActuatorOfflineProperties;
import cn.aradin.spring.actuator.starter.properties.ActuatorOnlineProperties;
@Configuration
@EnableConfigurationProperties({ActuatorOnlineProperties.class, ActuatorOfflineProperties.class})
public class AradinActuatorAutoConfiguration {
@Bean
@ConditionalOnMissingBean
public IOfflineHandler offlineHandler() {
return new DefaultOfflineHandler();
}
@Bean
@ConditionalOnMissingBean
public IOnlineHandler onlineHandler() {
return new DefaultOnlineHandler();
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy