org.springframework.context.annotation

## Annotation Type Conditional

-     @Retention(value=RUNTIME)
       @Target(value={TYPE,METHOD})
      public @interface Conditional

  Indicates that a component is only eligible for registration when all specified conditions match.

  A condition is any state that can be determined programmatically before the bean definition is due to be registered (see `Condition` for details).

  The `@Conditional` annotation may be used in any of the following ways:

  - as a type-level annotation on any class directly or indirectly annotated with `@Component`, including `@Configuration` classes
  - as a meta-annotation, for the purpose of composing custom stereotype annotations
  - as a method-level annotation on any `@Bean` method

  If a `@Configuration` class is marked with `@Conditional`, all of the `@Bean` methods, `@Import` and `@ComponentScan` annotations associated with that class will be subject to the conditions.

  NOTE: `@Conditional` annotations are not inherited; any conditions from superclasses or from overridden methods are not being considered.

  Since:
    4.0
  Author:
    Phillip Webb
  See Also:
    `Condition`

- - ### Required Element Summary

    Required Elements
    Modifier and Type | Required Element and Description
    --- | ---
    `Class<? extends Condition>[]` | `value` All `Condition`s that must match in order for the component to be registered.

- - ### Element Detail

    - #### value

          public abstract Class<? extends Condition>[] value

      All `Condition`s that must match in order for the component to be registered.