简体   繁体   中英

Is it possible to change the /health endpoint in spring-boot?

I have a spring-boot-web application and I am using actuator to check status of my application. Whenever I do /health I am able to check the status of my application. My doubt is, is it possible to change the /health endpoint to something like /ABC/health(I need to add context to /health). Is it possible or do I need to have a controller for this and need to handle it.

You can use a built-in property to expose all Actuator endpoints under different path. Just set it in your application.properties file:

management.context-path=/ABC

The health will be than available under /ABC/health .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM