What is Spring Boot Actuator?
Why Interviewers Ask This
This is a classic screening question for Spring Boot roles. Hiring managers ask it early in interviews to gauge your baseline understanding and determine if you can communicate technical concepts clearly.
Answer
Spring Boot Actuator provides production-ready management and monitoring endpoints for Spring Boot applications. Add: spring-boot-starter-actuator. Built-in endpoints (at /actuator/{endpoint}): /actuator/health — application health status (UP/DOWN) and component health; /actuator/info — application info (from application.properties or git info); /actuator/metrics — detailed metrics (JVM memory, CPU, HTTP requests, custom metrics); /actuator/env — environment properties and configuration; /actuator/beans — all beans in the application context; /actuator/mappings — all request mappings; /actuator/loggers — view and modify log levels at runtime; /actuator/threaddump — thread dump; /actuator/heapdump — heap dump; /actuator/httptrace — recent HTTP requests; /actuator/shutdown — graceful shutdown (disabled by default). Configuration: management.endpoints.web.exposure.include=health,info,metrics,loggers management.endpoint.health.show-details=always management.server.port=8081 # Separate port for actuator. Security: restrict actuator endpoints — require authentication. Use Spring Security to protect /actuator/** with ACTUATOR role. Expose only needed endpoints. Custom health indicator: implement HealthIndicator interface to add custom health checks. Metrics integration: Actuator integrates with Micrometer — expose metrics to Prometheus/Grafana/Datadog.
Common Mistake
Rushing to answer is a common mistake. Take two seconds to structure your response: definition → example → trade-off. This structure makes complex Spring Boot answers easy to follow.