public interface Condition
condition that must be matched in order
for a component to be registered.
Conditions are checked immediately before a component 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 BeanFactoryPostProcessor
and take care to never interact with bean instances.
Conditional,
ConditionContext| Modifier and Type | Method and Description |
|---|---|
boolean |
matches(ConditionContext context,
AnnotatedTypeMetadata metadata)
Determine if the condition matches.
|
boolean matches(ConditionContext context, AnnotatedTypeMetadata metadata)
context - the condition contextmetadata - meta-data of the class or
method being checked.true if the condition matches and the component can be registered
or false to veto registration.