Annotation Interface BeanOverride
Specifying this annotation registers the configured BeanOverrideProcessor
which must be capable of handling the composed annotation and its attributes.
Since the composed annotation will typically only be applied to non-static
fields, it is expected that the composed annotation is meta-annotated with
@Target(ElementType.FIELD). However, certain bean override
annotations may be declared with an additional ElementType.TYPE target
for use at the type level. Similarly, as of Spring Framework 7.1, certain bean
override annotations may be declared with an additional ElementType.PARAMETER
target for use on constructor parameters. For example, @MockitoBean can
be declared on a field, constructor parameter, test class, or test interface.
For concrete examples of such composed annotations, see
@TestBean,
@MockitoBean, and
@MockitoSpyBean.
- Since:
- 6.2
- Author:
- Simon Baslé, Sam Brannen
-
Required Element Summary
Required ElementsModifier and TypeRequired ElementDescriptionClass<? extends BeanOverrideProcessor> TheBeanOverrideProcessorimplementation to use.
-
Element Details
-
value
Class<? extends BeanOverrideProcessor> valueTheBeanOverrideProcessorimplementation to use.
-