Example usage for org.springframework.boot.actuate.health Health.Builder Health.Builder

List of usage examples for org.springframework.boot.actuate.health Health.Builder Health.Builder

Introduction

In this page you can find the example usage for org.springframework.boot.actuate.health Health.Builder Health.Builder.

Prototype

Health.Builder

Source Link

Usage

From source file:org.springframework.boot.actuate.health.AbstractHealthIndicator.java

@Override
public final Health health() {
    Health.Builder builder = new Health.Builder();
    try {/* ww w  . j  a va2  s  . c  om*/
        doHealthCheck(builder);
    } catch (Exception ex) {
        if (this.logger.isWarnEnabled()) {
            String message = this.healthCheckFailedMessage.apply(ex);
            this.logger.warn(StringUtils.hasText(message) ? message : DEFAULT_MESSAGE, ex);
        }
        builder.down(ex);
    }
    return builder.build();
}