I'm using Spring Boot 2 M3 actuators. By default, the health endpoint is mapped to /application/health
.
/health
? FYI从Spring Boot 2.0.0开始.RELEASE默认的健康端点是/actuator/health
In your application.properties file add this to set the base path to '/'
management.endpoints.web.base-path=/
Path will now be '/health'
Edit: Alternatively if you are using YAML use:
management:
endpoints:
web:
base-path: /
See this documentation for Spring Boot 2.0.0,
the property is,
management.context-path
I think this should work but cannot verify it right now. management.context-path=/
Yes, it is endpoints.health.path
.
Update
Sorry, I understood like you want to change health to something else.
If you want change /application/health to /health, then you should use endpoints.jmx.domain
. Or change path of your application to ROOT.
See
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.