management.security.enabled=false # 전체 다 활성화 management.server.port=8081 management.server.address=127.0.0.1 management.server.port=-1 # http endpoint 끄기
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("Error Code", errorCode).build(); } return Health.up().build(); } }
management.health
참고.