Spring Boot lets you expose custom health checks using
HealthIndicator
.Sample:
@Component public class QueueHealthIndicator implements HealthIndicator { public Health health() { if (queue.isAvailable()) { return Health.up().build(); } else { return Health.down().withDetail("queue", "Unavailable").build(); } } }
Useful for circuit breakers, dashboards, and alerts.