Indicates that a component is only eligible for registration when all
A condition is any state that can be determined programmatically
before the bean definition is due to be registered (see
Condition for details).
@Conditional annotation may be used in any of the following ways:
- as a type-level annotation on any class directly or indirectly annotated with
- as a meta-annotation, for the purpose of composing custom stereotype
- as a method-level annotation on any
@Configuration class is marked with
@Conditional, all of the
annotations associated with that class will be subject to the conditions.
@Conditional annotations are not inherited; any conditions from
superclasses or from overridden methods are not being considered.