@Target(value=TYPE)
@Retention(value=RUNTIME)
@Documented
@Component
public @interface TestComponent
@Component that can be used when a bean is intended only for tests,
and should be excluded from Spring Boot's component scanning.
Note that if you directly use @ComponentScan rather than relying
on @SpringBootApplication you should ensure that a TypeExcludeFilter is
declared as an excludeFilter.
TypeExcludeFilter,
TestConfiguration| Modifier and Type | Optional Element and Description |
|---|---|
java.lang.String |
value
The value may indicate a suggestion for a logical component name, to be turned into
a Spring bean in case of an auto-detected component.
|
@AliasFor(annotation=org.springframework.stereotype.Component.class) public abstract java.lang.String value