I've included Spring Actuator in my Spring Boot app but the health endpoint is not there/returning a 404. I can GET many of the other actuator endpoints and see them listed in the Tomcat log ie
EndpointHandlerMapping : Mapped "{[/autoconfig
EndpointHandlerMapping : Mapped "{[/beans
EndpointHandlerMapping : Mapped "{[/configprops
EndpointHandlerMapping : Mapped "{[/dump
EndpointHandlerMapping : Mapped "{[/env
EndpointHandlerMapping : Mapped "{[/env/{name:.*}]
EndpointHandlerMapping : Mapped "{[/info
EndpointHandlerMapping : Mapped "{[/mappings
EndpointHandlerMapping : Mapped "{[/metrics
EndpointHandlerMapping : Mapped "{[/metrics//{name:.*}]
EndpointHandlerMapping : Mapped "{[/trace
Below are application.properties spring.messages.encoding=UTF-8
# ----------------------------------------
# SECURITY PROPERTIES
# ----------------------------------------
# SECURITY (SecurityProperties)
security.basic.enabled=false
# ----------------------------------------
# ACTUATOR PROPERTIES
# ----------------------------------------
# ENDPOINTS (AbstractEndpoint subclasses)
endpoints.sensitive=false
endpoints.actuator.enabled=true
endpoints.health.sensitive=false
# MANAGEMENT HTTP SERVER (ManagementServerProperties)
management.security.enabled=false
Would anyone have any ideas what would stop the Actuator health endpoint being created/available?
尝试在application.properties中配置endpoints.health.enabled=true
您可以通过此属性启用其他端点:
management.endpoints.web.exposure.include=info, health, loggers, logfile, configprops
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.