Example usage for org.springframework.boot.autoconfigure.condition ConditionOutcome getMessage

List of usage examples for org.springframework.boot.autoconfigure.condition ConditionOutcome getMessage

Introduction

In this page you can find the example usage for org.springframework.boot.autoconfigure.condition ConditionOutcome getMessage.

Prototype

public String getMessage() 

Source Link

Document

Return an outcome message or null .

Usage

From source file:org.springframework.boot.autoconfigure.condition.SpringBootCondition.java

private StringBuilder getLogMessage(String classOrMethodName, ConditionOutcome outcome) {
    StringBuilder message = new StringBuilder();
    message.append("Condition ");
    message.append(ClassUtils.getShortName(getClass()));
    message.append(" on ");
    message.append(classOrMethodName);//from w w  w  .  j  av a 2s. c o m
    message.append(outcome.isMatch() ? " matched" : " did not match");
    if (StringUtils.hasLength(outcome.getMessage())) {
        message.append(" due to ");
        message.append(outcome.getMessage());
    }
    return message;
}