接口 Condition
- 所有已知子接口:
ConfigurationCondition
public interface Condition
A singleconditionthat must be matched in order for a component to be registered.Conditions are checked immediately before the bean-definition is due to be registered and are free to veto registration based on any criteria that can be determined at that point.
Conditions must follow the same restrictions as
BeanFactoryPostProcessorand take care to never interact with bean instances. For more fine-grained control of conditions that interact with@Configurationbeans consider theConfigurationConditioninterface.- 从以下版本开始:
- 4.0
- 作者:
- Phillip Webb
- 另请参阅:
ConfigurationCondition,Conditional,ConditionContext
方法概要
所有方法 实例方法 抽象方法 修饰符和类型 方法 说明 booleanmatches(ConditionContext context, AnnotatedTypeMetadata metadata)Determine if the condition matches.
方法详细资料
matches
boolean matches(ConditionContext context, AnnotatedTypeMetadata metadata)
Determine if the condition matches.