A practical guide to Spring Boot Actuator endpoints
Spring Boot Actuator turns a running Spring Boot service into an inspectable system. Its management endpoints provide health, metrics, configuration metadata, diagnostics and build information, letting operators inspect an application without attaching a debugger. Most endpoints sit beneath /actuator, and Spring Boot 3.x can place them on a separate management port for tighter network controls.
For Australian teams, the goal is not to enable everything. Services run from Melbourne to Sydney, often on Kubernetes or in the AWS Sydney Region, where operational access must balance speed, privacy and cost. The examples below show how to expose, secure, interpret and maintain Spring Boot Actuator endpoints in development and production.
Expose only what you need
Start with an explicit allowlist instead of exposing every endpoint and removing dangerous ones later:
management:
endpoints:
web:
exposure:
include: health,info,metrics,prometheus
A fresh Spring Boot application normally exposes only the health endpoint through the web. The discovery page at /actuator links to available endpoints, so protect that route as well. Exposure and enablement are separate controls: the prometheus endpoint, for example, is unavailable until the Micrometer Prometheus registry is added to the application.
Put management access behind controls
An exposed endpoint is not automatically an authenticated endpoint. Apply Spring Security rules to management paths, using separate administrator or operations roles where appropriate. The health endpoint may need broad read access for load balancers, while metrics, loggers and diagnostic endpoints should normally remain restricted to operational accounts.
A separate management listener adds another layer of control:
management:
server:
port: 8081
Keep that port on a private network or restrict it through the ingress firewall. A different port alone is not a security boundary, and reverse proxies, load balancers and cloud security groups must apply equally strict rules. Treat env, configprops, heapdump and loggers as sensitive. Disable them where possible, since heap dumps can contain credentials, tokens or personal information.
Use health checks for real decisions
The default /actuator/health response is deliberately limited to the overall status. Detailed component information can be revealed only to authorised users:
management:
endpoint:
health:
show-details: when-authorized
probes:
enabled: true
With probes enabled, /actuator/health/liveness and /actuator/health/readiness become available for orchestration platforms. A liveness probe should avoid remote dependencies, because a failed database call should not cause a healthy application to restart. Readiness can include the database and other services required to serve traffic.
Australian teams often use “health check” for both questions, so keep their meanings separate: “Is it alive?” differs from “Can it accept requests?” Use liveness for the first and readiness for the second.
Turn metrics into useful signals
Micrometer collects JVM, HTTP, cache, connection-pool and application metrics. Adding the Prometheus registry exposes them in a scrape-friendly format at /actuator/prometheus. Instrument business operations with counters and timers, but avoid placing customer email addresses, order identifiers or full IP addresses in metric labels.
Useful alerts usually cover request errors, response latency, resource saturation and unexpected restarts. Connection-pool exhaustion and rising garbage-collection time often explain slow requests before the application itself appears unhealthy. Add shared tags such as the application name and deployment region so dashboards remain consistent across environments.
Operational telemetry can still contain personal information under the Privacy Act and Australian Privacy Principles. Treat metric labels, request paths and diagnostic output as data, apply retention policies, and restrict access to dashboards containing production information.
Build a repeatable operations routine
The /actuator discovery view, info, scheduledtasks, threaddump and loggers endpoints support routine investigations. Scheduled-task information can confirm when jobs will run, including jobs configured for Sydney or Melbourne as those locations move between AEST and AEDT. The loggers endpoint can alter log levels at runtime, so restrict that operation to trusted administrators.
Make deployment checks repeatable by confirming readiness before traffic is shifted and recording the deployed version through the info endpoint. The Spring Boot build-info plugin can add Git commit details, while dependency locking or a pinned parent version reduces surprises between Spring Boot releases. Include Actuator checks in staging and production smoke tests rather than discovering an inaccessible management port during an incident.
Teams republishing or adapting these examples should check the JavaWhizz copyright notice before using them in internal documentation. A narrow allowlist, enforced access controls and tested alerts make Actuator useful without turning it into an accidental map of the application.