I have a project setup with spring boot 1.4.2 and CXF JAXRS. I want to add spring boot actuator to the project. This is the configuration which I added to the project.
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-actuator</artifactId>
</dependency>
I create a WAR file after this and then deploy it in external tomcat server. But when I access the health URL localhost:8080/management/health it is giving 404 HTTP code. The server starts properly and I can see the logs with following details:
Health configuration log
[localhost-startStop-1] INFO org.springframework.boot.actuate.endpoint.mvc.EndpointHandlerMapping - Mapped "{[/management/health || /management/health.json],produces=[application/json]}" onto public java.lang.Object
Servlet(s) configuration log
[localhost-startStop-1] INFO org.springframework.boot.web.servlet.DelegatingFilterProxyRegistrationBean - Mapping filter: 'springSecurityFilterChain' to: [/*]
[localhost-startStop-1] INFO org.springframework.boot.web.servlet.FilterRegistrationBean - Mapping filter: 'webRequestLoggingFilter' to: [/*]
[localhost-startStop-1] INFO org.springframework.boot.web.servlet.FilterRegistrationBean - Mapping filter: 'applicationContextIdFilter' to: [/*]
[localhost-startStop-1] INFO org.springframework.boot.web.servlet.ServletRegistrationBean - Mapping servlet: 'dispatcherServletRegistration' to []
[localhost-startStop-1] INFO org.springframework.boot.web.servlet.ServletRegistrationBean - Mapping servlet: 'dispatcherServlet' to [/]
[localhost-startStop-1] INFO org.springframework.boot.web.servlet.ServletRegistrationBean - Mapping servlet: 'CXFServlet' to [/services/*]
{[/management/health || /management/health.json]
that represents a path... not/health
but/management/health
. It is right there... – M. Deinum