This SPI service integrates with Spring Boot’s HealthIndicator SPI, surfaced through the Spring Boot Actuator.

This is accessible from the /actuator/health endpoint.

The service, when called, will be within the context of a special internal user health with the internal role health-role.

This service was introduced to allow deployment infrastructure to monitor the app and (potentially) restart it if required. For example, if deploying to Docker then both Docker Swarm and Kubernetes are orchestrators that can perform this task.


The SPI defined by HealthCheckService is:

public interface HealthCheckService {

    Health check();



The framework provides no default implementation, but the simpleapp starter app provides a sample implementation:

public class HealthCheckServiceImpl implements HealthCheckService {

    private final SimpleObjects simpleObjects;

    public HealthCheckServiceImpl(SimpleObjects simpleObjects) {
        this.simpleObjects = simpleObjects;

    public Health check() {
        try {
            return Health.ok();
        } catch (Exception ex) {
            return Health.error(ex);

The internal domain service acts as the bridge between Spring and the `HealthCheckService' SPI.