Chapter01/Sping boot

[Spring boot ] Load balancer health Check

EmmaDev_v 2025. 6. 13. 18:48

 

 

네니오

지금 할게욥

 

 

 

 

 

build.gradle에 의존성 추가해주고 

implementation 'org.springframework.boot:spring-boot-starter-actuator'

 

 

application.yml도 작성

management:
  server:
    base-path: /actuator
  endpoints:
    web:
      exposure:
        include: health, info
  endpoint:
    health:
      show-details: always

 

 

 

 

엄청 간단한게 안됐었던 이유는

화이트 리스트에 

넣는것을 깜빡했슴,,

 

 

 

 

첨에 실행할때 

로컬에서도 잘 뜨구 

 

 

 

 

 

 

 

컨테이너에 올렷을 때도 잘 뜬당

 

 

 

 

curl 날려서 확인해보자

curl {url:port}/api/actuator/health

 

 

 

 

 

 

status : UP !!!

 

 

 

 

 

 

반응형