문서의 선택한 두 판 사이의 차이를 보여줍니다.
양쪽 이전 판 이전 판 다음 판 | 이전 판 다음 판 양쪽 다음 판 | ||
springframework:springboot:actuator [2018/03/28 16:32] kwon37xi |
springframework:springboot:actuator [2021/07/22 16:02] kwon37xi |
||
---|---|---|---|
줄 15: | 줄 15: | ||
</ | </ | ||
+ | ===== Health Check ===== | ||
+ | * [[https:// | ||
+ | <code java> | ||
+ | import org.springframework.boot.actuate.health.Health; | ||
+ | import org.springframework.boot.actuate.health.HealthIndicator; | ||
+ | import org.springframework.stereotype.Component; | ||
+ | |||
+ | @Component | ||
+ | public class MyHealthIndicator implements HealthIndicator { | ||
+ | |||
+ | @Override | ||
+ | public Health health() { | ||
+ | int errorCode = check(); // perform some specific health check | ||
+ | if (errorCode != 0) { | ||
+ | return Health.down().withDetail(" | ||
+ | } | ||
+ | return Health.up().build(); | ||
+ | } | ||
+ | |||
+ | } | ||
+ | </ | ||
+ | * [[https:// | ||
+ | |||
+ | ===== 참조 ===== | ||
+ | * [[https:// | ||
+ | * [[https:// | ||
+ | * [[https:// | ||
+ | * [[https:// | ||
+ | * [[https:// | ||
+ | * [[https:// | ||
+ | * [[https:// |