Only /health and /info are exposed by default; anything else must be listed explicitly.
// build.gradle: implementation 'org.springframework.boot:spring-boot-starter-actuator'
// application.yml
management:
endpoints:
web:
exposure:
include: health,info,metrics,prometheus
endpoint:
health:
show-details: when_authorized
GET /actuator/health
{"status":"UP","components":{"db":{"status":"UP"},"diskSpace":{"status":"UP"}}}
Run this yourself in the Online Java Compiler, spin up a live REST API in the API Sandbox, or practise with Java interview questions.
Published 2026-08-11