Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/spring-projects/spring-boot/llms.txt

Use this file to discover all available pages before exploring further.

Spring Boot Actuator brings production-ready observability and management capabilities to any Spring Boot application. By adding a single starter dependency, you gain HTTP endpoints for health checks, live metrics, environment inspection, thread dumps, and more — all secured and configurable without writing boilerplate code.

Adding the dependency

Add spring-boot-starter-actuator to your project. Spring Boot auto-configures every feature in this module once the starter is on the classpath.
<dependencies>
    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-actuator</artifactId>
    </dependency>
</dependencies>

What is available by default

After adding the dependency, only the /actuator/health endpoint is exposed over HTTP. A discovery page listing all available endpoints is accessible at /actuator.
By default, only the health endpoint is exposed over HTTP and JMX. Endpoints may contain sensitive information, so you should carefully consider which ones to expose in production.

Exposing additional endpoints

Use management.endpoints.web.exposure.include to expose more endpoints. The * wildcard selects all endpoints.
management:
  endpoints:
    web:
      exposure:
        include: "*"
Before exposing endpoints publicly, ensure they do not contain sensitive information or are placed behind a firewall or Spring Security.

Controlling access

Each endpoint has an access property with three levels:
ValueBehavior
unrestrictedAvailable to all callers
read-onlyOnly @ReadOperation methods (GET/HEAD) are accessible
noneEndpoint is removed from the application context entirely
To require opt-in rather than opt-out, set the default to none and enable individual endpoints:
management:
  endpoints:
    access:
      default: none
  endpoint:
    loggers:
      access: read-only
    health:
      access: unrestricted

Securing actuator endpoints

If Spring Security is on the classpath and no custom SecurityFilterChain bean is present, Spring Boot auto-configuration secures all actuator endpoints except /health. To apply role-based access, define your own security configuration using EndpointRequest:
import org.springframework.boot.actuate.autoconfigure.security.servlet.EndpointRequest;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.security.config.annotation.web.builders.HttpSecurity;
import org.springframework.security.web.SecurityFilterChain;

@Configuration
public class MySecurityConfiguration {

    @Bean
    public SecurityFilterChain securityFilterChain(HttpSecurity http) throws Exception {
        http.securityMatcher(EndpointRequest.toAnyEndpoint());
        http.authorizeHttpRequests((requests) ->
            requests.anyRequest().hasRole("ENDPOINT_ADMIN"));
        http.httpBasic(withDefaults());
        return http.build();
    }

}
EndpointRequest.to("endpoint") matches the endpoint root and all its subpaths, effectively matching /actuator/endpoint/**.

Using a separate management port

To run actuator endpoints on a different port from your main application — useful for internal-only access — configure management.server.port:
management:
  server:
    port: 8081
    address: "127.0.0.1"
Setting the port to -1 disables HTTP management endpoints entirely.

Customizing the base path

Change the /actuator prefix using management.endpoints.web.base-path:
management:
  endpoints:
    web:
      base-path: "/manage"
This remaps all endpoints from /actuator/{id} to /manage/{id}.

Endpoints reference

Browse all built-in endpoints and learn how to create custom ones.

Health checks

Understand health status values, indicators, and Kubernetes probes.

Metrics

Explore Micrometer integration and supported monitoring systems.

Build docs developers (and LLMs) love