Provides patterns to configure Spring Boot Actuator for production-grade monitoring, health probes, secured management endpoints, and Micrometer metrics across JVM services. Use when setting up monitoring, health checks, or metrics for Spring Boot applications.
references/.<!-- Maven -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
// Gradle
dependencies {
implementation "org.springframework.boot:spring-boot-starter-actuator"
}
After adding the dependency, verify endpoints respond:
curl http://localhost:8080/actuator/health
curl http://localhost:8080/actuator/info
Include spring-boot-starter-actuator in your build configuration.
Validate: Restart the service and confirm
/actuator/healthand/actuator/inforespond with200 OK.
management.endpoints.web.exposure.include to the precise list or "*" for internal deployments.management.endpoints.web.base-path (e.g., /management) when the default /actuator conflicts with routing.references/endpoint-reference.md.Validate:
curl http://localhost:8080/actuatorreturns the list of exposed endpoints.
SecurityFilterChain using EndpointRequest.toAnyEndpoint() with role-based rules.management.server.port with firewall controls or service mesh policies for operator-only access./actuator/health/** publicly accessible only when required; otherwise enforce authentication.Validate: Unauthenticated requests to protected endpoints return
401 Unauthorized.
management.endpoint.health.probes.enabled=true for /health/liveness and /health/readiness.management.endpoint.health.group.* to match platform expectations.HealthIndicator or ReactiveHealthContributor; sample implementations in references/examples.md#custom-health-indicator.Validate:
/actuator/health/readinessreturnsUPwith all mandatory components before promoting to production.
management.metrics.export.*.MeterRegistryCustomizer beans to add application, environment, and business tags for observability correlation.server.observation.* configuration when using Spring Boot 3.2+.Validate: Scrape
/actuator/prometheusand confirm required meters (http.server.requests,jvm.memory.used) are present.
/actuator/startup (Spring Boot 3.5+) and /actuator/conditions during incident response to inspect auto-configuration decisions.HttpExchangeRepository (e.g., InMemoryHttpExchangeRepository) before enabling /actuator/httpexchanges for request auditing.references/endpoint-reference.md for endpoint behaviors and limits.Validate:
/actuator/startupand/actuator/conditionsreturn valid JSON payloads.