Spring Boot Actuator exposes a set of built-in HTTP endpoints under /actuator that provide monitoring and management insight into a running application.
Key Points: • /actuator/health reports the application's up/down status and can aggregate downstream dependency checks. • /actuator/info surfaces custom build and application metadata. • /actuator/metrics exposes runtime metrics like memory usage, HTTP request counts, and JVM stats, often scraped by Prometheus. • /actuator/env lists the active configuration properties and their sources. • /actuator/loggers lets you view and change log levels at runtime without restarting the app. • Most endpoints are disabled by default except health and info, and must be explicitly enabled and secured.
Example: Hitting GET /actuator/health in production returns {"status":"UP"}, which a load balancer or Kubernetes liveness probe can poll to decide whether to keep routing traffic to that instance.
Code Example:
# application.yml
management:
endpoints:
web:
exposure:
include: health,info,metrics,loggers
endpoint:
health:
show-details: alwaysInterview Tip: A concise interview answer is:
"Actuator gives you endpoints like /health, /info, /metrics, /env, and /loggers out of the box, which cover status checks, build metadata, runtime metrics, active configuration, and live log-level changes. I always lock down which ones are exposed and add authentication before shipping to production, since some leak sensitive details."