This SPI service allow runtime infrastructure such as Kubernetes or Docker Swarm to monitor the app and (potentially) restart it if required.

This SPI service integrates with Spring Boot’sHealthIndicatorSPI, surfaced through theSpring Boot Actuator. It is therefore accessible from the /actuator/health endpoint (Spring allows the endpoint URL to be altered or suppressed).

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

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.