public interface Condition
conditionthat 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
and take care to never interact with bean instances.
boolean matches(ConditionContext context, AnnotatedTypeMetadata metadata)
context- the condition context
metadata- meta-data of the
trueif the condition matches and the component can be registered or
falseto veto registration.