Annotation Interface BeanOverride
@Retention(RUNTIME)
@Target(ANNOTATION_TYPE)
@Documented
@Reflective(org.springframework.test.context.bean.override.BeanOverrideReflectiveProcessor.class)
public @interface BeanOverride
Mark a composed annotation as eligible for Bean Override processing.
Specifying this annotation registers the configured BeanOverrideProcessor
which must be capable of handling the composed annotation and its attributes.
Since the composed annotation should only be applied to non-static fields, it is
expected that it is meta-annotated with @Target(ElementType.FIELD)
.
For concrete examples, see
@TestBean
,
@MockitoBean
, and
@MockitoSpyBean
.
- Since:
- 6.2
- Author:
- Simon Baslé, Sam Brannen
-
Required Element Summary
Modifier and TypeRequired ElementDescriptionClass<? extends BeanOverrideProcessor>
TheBeanOverrideProcessor
implementation to use.
-
Element Details
-
value
Class<? extends BeanOverrideProcessor> valueTheBeanOverrideProcessor
implementation to use.
-