Class AllNestedConditions
- java.lang.Object
- org.springframework.boot.autoconfigure.condition.SpringBootCondition
- org.springframework.boot.autoconfigure.condition.AbstractNestedCondition
- org.springframework.boot.autoconfigure.condition.AllNestedConditions
- All Implemented Interfaces:
org.springframework.context.annotation.Condition,org.springframework.context.annotation.ConfigurationCondition
public abstract class AllNestedConditions extends AbstractNestedCondition
Conditionthat will match when all nested class conditions match. Can be used to create composite conditions, for example:static class OnJndiAndProperty extends AllNestedConditions { OnJndiAndProperty() { super(ConfigurationPhase.PARSE_CONFIGURATION); } @ConditionalOnJndi() static class OnJndi { } @ConditionalOnProperty("something") static class OnProperty { } }The
ConfigurationPhaseshould be specified according to the conditions that are defined. In the example above, all conditions are static and can be evaluated early soPARSE_CONFIGURATIONis a right fit.- Since:
- 1.3.0
Nested Class Summary
Nested classes/interfaces inherited from class org.springframework.boot.autoconfigure.condition.AbstractNestedCondition
AbstractNestedCondition.MemberMatchOutcomes
Constructor Summary
Constructors Constructor Description AllNestedConditions(org.springframework.context.annotation.ConfigurationCondition.ConfigurationPhase configurationPhase)
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected ConditionOutcomegetFinalMatchOutcome(AbstractNestedCondition.MemberMatchOutcomes memberOutcomes)Methods inherited from class org.springframework.boot.autoconfigure.condition.AbstractNestedCondition
getConfigurationPhase, getMatchOutcome
Methods inherited from class org.springframework.boot.autoconfigure.condition.SpringBootCondition
anyMatches, logOutcome, matches, matches
Constructor Detail
AllNestedConditions
public AllNestedConditions(org.springframework.context.annotation.ConfigurationCondition.ConfigurationPhase configurationPhase)
Method Detail
getFinalMatchOutcome
protected ConditionOutcome getFinalMatchOutcome(AbstractNestedCondition.MemberMatchOutcomes memberOutcomes)
- Specified by:
getFinalMatchOutcomein classAbstractNestedCondition