@@ -0,0 +1,999 @@
+package hr.kapsch.javacro.actuator;%0A%0Aimport java.time.LocalDateTime;%0A%0Aimport org.springframework.boot.actuate.health.AbstractHealthIndicator;%0Aimport org.springframework.boot.actuate.health.Health;%0Aimport org.springframework.stereotype.Component;%0A%0A@Component%0Apublic class JavaCroHealthIndicator extends AbstractHealthIndicator %7B%0A%0A%09private static final LocalDateTime JAVA_CRO_16_START = LocalDateTime.of(2016, 5, 18, 18, 30);%0A%09private static final LocalDateTime JAVA_CRO_16_END = LocalDateTime.of(2016, 5, 20, 18, 30);%0A%0A%09@Override%0A%09protected void doHealthCheck(Health.Builder builder) throws Exception %7B%0A%09%09LocalDateTime now = LocalDateTime.now();%0A%09%09if (now.isBefore(JAVA_CRO_16_START)) %7B%0A%09%09%09builder.down().withDetail(%22message%22, %22JavaCRO '16 starts on %22 + JAVA_CRO_16_START);%0A%09%09%7D%0A%09%09else if (now.isAfter(JAVA_CRO_16_END)) %7B%0A%09%09%09builder.down().withDetail(%22message%22, %22JavaCRO '16 as ended on %22 + JAVA_CRO_16_END);%0A%09%09%7D%0A%09%09else %7B%0A%09%09%09builder.up().withDetail(%22message%22, %22JavaCRO '16 is in progress%22);%0A%09%09%7D%0A%09%7D%0A%0A%7D%0A

Implement demo health indicator