The Spring Boot Actuator module adds production-ready operational endpoints to an application: health checks, metrics, environment and configuration details, loggers, thread dumps and more. Its purpose is to let operators and monitoring systems observe and manage a running service without you writing that plumbing yourself.
You enable it by adding spring-boot-starter-actuator. Endpoints are served over HTTP under /actuator and are also available over JMX. Since Spring Boot 3, metrics are built on Micrometer and the Observation API.
Actuator groups its features into endpoints. The most useful ones are:
| Endpoint | What it shows |
|---|---|
health | Application status (UP, DOWN) and the state of dependencies such as the database |
info | Build, git and custom application information |
metrics | Micrometer metrics: JVM memory, CPU, HTTP request timings, connection pools |
prometheus | Metrics in Prometheus format (needs the Prometheus registry on the classpath) |
env | Properties from the Environment, with sensitive values sanitized |
configprops | All @ConfigurationProperties beans and their values |
beans | Every bean in the application context |
mappings | All request mappings |
loggers | Logger levels, which can be changed at runtime |
threaddump, heapdump | Diagnostic snapshots of the JVM |
shutdown | Graceful shutdown, disabled by default |
For Maven, add the starter:
For Gradle:
After starting the application, open /actuator. By default only health is exposed over HTTP, which is a deliberate safe default. A request to /actuator/health returns:
Exposure over the web is controlled with properties in application.yml:
Key points about this configuration:
exposure.include lists the web endpoints to expose. Using * exposes all of them, which is risky outside local development.show-details: when-authorized hides component details from anonymous callers. The default is never.probes.enabled adds /actuator/health/liveness and /actuator/health/readiness. These map directly to Kubernetes liveness and readiness probes (they are also enabled automatically when Spring Boot detects it runs on Kubernetes).info.env.enabled is needed for properties under info.* to show in the info endpoint in current Spring Boot versions.Spring Boot auto-configures health indicators for the data source, disk space, Redis, Kafka, mail and many other components when they are present. You can add your own by implementing HealthIndicator:
The indicator's name is derived from the bean name (paymentGatewayHealthIndicator becomes paymentGateway). Keep checks fast and avoid heavy calls, because health endpoints are polled often.
Actuator publishes metrics through Micrometer, a vendor-neutral facade. Add a registry dependency for your monitoring system, for example micrometer-registry-prometheus, and the prometheus endpoint appears. You can then record your own metrics:
Browse /actuator/metrics for the list of meter names, and /actuator/metrics/jvm.memory.used for one meter.
Endpoints such as env, heapdump, loggers and shutdown can leak data or change behaviour, so treat them as sensitive.
EndpointRequest.toAnyEndpoint() requests.management.server.port and keep that port off the public network.shutdown disabled unless you have a clear need.No. It is useful in every environment, but it is described as production-ready because it targets monitoring and operations. Just lock it down in production.
Expose the loggers endpoint and send a POST request to /actuator/loggers/<logger name> with a body such as {"configuredLevel": "DEBUG"}.
Liveness says the process is running and should not be restarted. Readiness says it can accept traffic; during startup or when a dependency is unavailable it reports out-of-service so load balancers skip it.
Yes. The same endpoints are available on reactive applications.
The Actuator module provides health, metrics, configuration and diagnostic endpoints so you can monitor and manage Spring Boot applications in production. Add the starter, expose only the endpoints you need, connect Micrometer to your monitoring system, add custom health indicators for critical dependencies, and secure everything that reveals internals.