🔴 The Error You're Seeing
Confirm this matches your console output. If it does, you're in the right place.
2026-02-14 11:45:30.500 WARN 8842 --- [nio-8080-exec-3] o.s.web.servlet.PageNotFound : No mapping for GET /actuator/health⚡ Quick Fix Works 80% of the time
Expose the endpoints in application.properties.
management.endpoints.web.exposure.include=health,info,metrics🧠 Why this Happens
Tap to expand the deep technical explanation
You are trying to access a Spring Boot Actuator endpoint, but either the Actuator dependency is missing, or the specific endpoint (like /metrics or /env) is not explicitly exposed over HTTP in your configuration.
The HITEC City Parking Spot Analogy:
It is like looking for a specific room in a building, but the hallway leading to it is locked. The room exists, but the architect (Spring Boot) locked the hallway for security reasons. You need the key (exposure.include) to open it.
🔁 How to Reproduce Confirm this is your error
Add spring-boot-starter-actuator without exposing endpoints, then hit GET /actuator/health in your browser. You get 404 with No mapping for GET /actuator/health.
🛠️ Solutions (3 Ways to Fix)
Expose endpoints in application.properties
👉 Use this when you have the dependency installed but the URL returns 404.
For security reasons, Spring Boot only exposes /actuator/health over HTTP by default. You must explicitly allow others.
# application.properties
management.endpoints.web.exposure.include=*
# OR specific ones:
management.endpoints.web.exposure.include=health,info,metrics,prometheusAdd the Actuator dependency
👉 Use this if hitting /actuator gives a 404 for the base path itself.
If the dependency isn't in your pom.xml, the endpoints don't exist at all.
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>Change the base path
👉 Use this if you want the endpoints under a different URL (e.g., /manage/health).
If you configured a custom base path, you must use that instead of /actuator.
# application.properties
management.endpoints.web.base-path=/manage
// Now the URL is: http://localhost:8080/manage/health📋 Version Notes
Default base path is /actuator. /health is exposed by default.
Default base path is /actuator. /health is exposed, but without details unless show-details=always is set.
🛡️ How to Prevent This Next Time
Standardize your Actuator configuration across all microservices early in the project setup.