Spring Boot Actuator is not working for rest-full application, getting Whitelabel Error Page on browser and below error in console log.
org.springframework.web.servlet.NoHandlerFoundException: No handler found for GET /actuator/health
Added below maven dependency.
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
I cross checked, jar file available in class path.
Spring boot application version
<version>2.4.1</version>
Added properties in application.properties file
management.endpoints.enabled-by-default=true
management.endpoint.info.enabled=true
management.security.enabled=false
management.endpoints.web.exposure.include=*
spring.mvc.throw-exception-if-no-handler-found=true
Unable to access Actuator with below URL's
http://localhost:8090/actuator/health
http://localhost:8090/actuator/
http://localhost:8090/health/
Logs
WARN IN-WKS-435 [nio-8090-exec-1] o.s.w.s.PageNotFound : No mapping for GET /actuator/health
WARN IN-WKS-435 [nio-8090-exec-1] o.s.w.s.PageNotFound : No handler found for GET /actuator/health
WARN IN-WKS-435 [nio-8090-exec-1] .w.s.m.s.DefaultHandlerExceptionResolver : Resolved [org.springframework.web.servlet.NoHandlerFoundException: No handler found for GET /actuator/health]
Note: Apart from this, whole application is working fine.
Kindly suggest if I need to add any additional configuration in our application.
management.server.port
configuration value in properties? It will change the port where actuator is accessible 2. Logs of application upon call - to see if there are no errors 3. On startup of application please check log lineExposing 14 endpoint(s) beneath base path '/actuator'
- to double-check that such endpoints are actually exposed. Hope this helps to identify the root cause – Organize