개발/Spring

Spring boot health check.

JangHC 2022. 4. 6. 22:01

 

gradle 

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

 

 

properties
#health check
management.endpoints.web.base-path=/actuator
management.endpoints.web.path-mapping.health=health_check
management.endpoint.health.show-details=never

 

만약 security를 사용한다면,

 

.antMatchers("/actuator/health_check").permitAll()

을 해줘야 한다.