类 AnyNestedCondition
- java.lang.Object
- org.springframework.boot.autoconfigure.condition.SpringBootCondition
- org.springframework.boot.autoconfigure.condition.AnyNestedCondition
- 所有已实现的接口:
org.springframework.context.annotation.Condition
,org.springframework.context.annotation.ConfigurationCondition
@Order(2147483627) public abstract class AnyNestedCondition extends SpringBootCondition
Condition
that will match when any nested class condition matches. Can be used to create composite conditions, for example:static class OnJndiOrProperty extends AnyNestedCondition { OnJndiOrProperty() { super(ConfigurationPhase.PARSE_CONFIGURATION); } @ConditionalOnJndi() static class OnJndi { } @ConditionalOnProperty("something") static class OnProperty { } }
The
ConfigurationPhase
should be specified according to the conditions that are defined. In the example above, all conditions are static and can be evaluated early soPARSE_CONFIGURATION
is a right fit.- 从以下版本开始:
- 1.2.0
构造器概要
构造器 构造器 说明 AnyNestedCondition(org.springframework.context.annotation.ConfigurationCondition.ConfigurationPhase configurationPhase)
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 org.springframework.context.annotation.ConfigurationCondition.ConfigurationPhase
getConfigurationPhase()
protected ConditionOutcome
getFinalMatchOutcome(org.springframework.boot.autoconfigure.condition.AbstractNestedCondition.MemberMatchOutcomes memberOutcomes)
ConditionOutcome
getMatchOutcome(org.springframework.context.annotation.ConditionContext context, org.springframework.core.type.AnnotatedTypeMetadata metadata)
Determine the outcome of the match along with suitable log output.从类继承的方法 org.springframework.boot.autoconfigure.condition.SpringBootCondition
anyMatches, logOutcome, matches, matches
构造器详细资料
AnyNestedCondition
public AnyNestedCondition(org.springframework.context.annotation.ConfigurationCondition.ConfigurationPhase configurationPhase)
方法详细资料
getFinalMatchOutcome
protected ConditionOutcome getFinalMatchOutcome(org.springframework.boot.autoconfigure.condition.AbstractNestedCondition.MemberMatchOutcomes memberOutcomes)
getConfigurationPhase
public org.springframework.context.annotation.ConfigurationCondition.ConfigurationPhase getConfigurationPhase()
- 指定者:
getConfigurationPhase
在接口中org.springframework.context.annotation.ConfigurationCondition
getMatchOutcome
public ConditionOutcome getMatchOutcome(org.springframework.context.annotation.ConditionContext context, org.springframework.core.type.AnnotatedTypeMetadata metadata)
从类复制的说明:SpringBootCondition
Determine the outcome of the match along with suitable log output.- 指定者:
getMatchOutcome
在类中SpringBootCondition
- 参数:
context
- the condition contextmetadata
- the annotation metadata- 返回:
- the condition outcome