List of usage examples for org.springframework.boot.autoconfigure.condition ConditionMessage empty
public static ConditionMessage empty()
From source file:org.juiser.spring.boot.config.JuiserSpringSecurityCondition.java
@Override public ConditionOutcome getMatchOutcome(ConditionContext context, AnnotatedTypeMetadata metadata) { ConditionMessage matchMessage = ConditionMessage.empty(); boolean enabled = isSpringSecurityEnabled(context); if (metadata.isAnnotated(ConditionalOnJuiserSpringSecurityEnabled.class.getName())) { if (!enabled) { return ConditionOutcome .noMatch(ConditionMessage.forCondition(ConditionalOnJuiserSpringSecurityEnabled.class) .didNotFind("spring security enabled").atAll()); }/*w ww . jav a2s. c o m*/ matchMessage = matchMessage.andCondition(ConditionalOnJuiserSpringSecurityEnabled.class) .foundExactly("spring security enabled"); } if (metadata.isAnnotated(ConditionalOnJuiserSpringSecurityDisabled.class.getName())) { if (enabled) { return ConditionOutcome .noMatch(ConditionMessage.forCondition(ConditionalOnJuiserSpringSecurityDisabled.class) .didNotFind("spring security disabled").atAll()); } matchMessage = matchMessage.andCondition(ConditionalOnJuiserSpringSecurityDisabled.class) .didNotFind("spring security disabled").atAll(); } return ConditionOutcome.match(matchMessage); }