springboot 3

spring boot 3.x + actuator 파헤치기. 5. about health endpoint

https://youtu.be/vGCN34hGBUQ actuator 에서 기본 제공하는 endpoint 중 모니터링 시스템과 자주 연동될 endpoint 로 health endpoint 가 있습니다. 이름에서 알수 있듯이 application의 health 정보를 제공합니다. default health endpoint application.yml 에 아래 설정만 한 상태에서 spring boot 를 구동해봅시다. management: endpoints: web: exposure: include: "*" 이후 웹브라우저에서 health endpoint 로 접근해봅시다. 위와 같이 application이 구동중이라는 의미의 status: UP 이라는 json을 리턴합니다. 고작 이 정보만 있지는 않겠죠? 아..

spring boot 3.x + actuator 파헤치기. 4. custom endpoint 생성

https://youtu.be/FoC5h1GHkKA spring boot 에서는 "이런게 기본제공 되지 않을까? " 혹은 "이런 기능이 있었으면 좋겠다!" 라고 생각할 만한 대부분의 범용 기능들이 기본으로 제공되고 있습니다. 즉 등록된 bean 리스트, cache 상태 등이 기본 제공됩니다. 그러나, 실무에서 사내 정책에 따라 사내 전용 endpoint 가 필요한 경우가 있습니다. 이번 포스팅에서는 custom endpoint 를 생성하는 방법에 대해 알아보겠습니다. 참고로 공식 가이드는 https://docs.spring.io/spring-boot/docs/current/reference/html/actuator.html#actuator.endpoints.implementing-custom 를 참고하면..

spring boot 3.x + actuator 파헤치기. 3. endpoints 설정

https://youtu.be/Ap_vrMyvya8 이전 시간에 actuator 를 통해 http://localhost:8080/actuator 로 접속시 아래와 같은 json 이 나오고, json 내의 링크들에 들어가면 또 다시 json 이 나오는 구조라고 설명을 했습니다. ( 이걸 HATEOAS 라고 부른다고 했었죠? ) 이런식으로 정보를 얻을수 있는 링크. 정확히는 url 을 actuator 에서는 endpoint 라고 부릅니다. 즉 http://localhost:8080/actuator/health 초, ms -> 밀리초, h -> 시간, d -> 일 CORS support 일반적으로는 모니터링 서버에서 endpoint 를 호출합니다. 즉 actuator 입장에서의 client 는 일반적으로는 다..