use of org.springframework.boot.availability.AvailabilityState in project spring-boot by spring-projects.
the class AvailabilityStateHealthIndicator method doHealthCheck.
@Override
protected void doHealthCheck(Builder builder) throws Exception {
AvailabilityState state = getState(this.applicationAvailability);
Status status = this.statusMappings.get(state);
if (status == null) {
status = this.statusMappings.get(null);
}
Assert.state(status != null, () -> "No mapping provided for " + state);
builder.status(status);
}
Aggregations