Annotation Type TestComponent
@Target(TYPE) @Retention(RUNTIME) @Documented @Component public @interface TestComponent
@Componentthat 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
@ComponentScanrather than relying on@SpringBootApplicationyou should ensure that aTypeExcludeFilteris declared as anexcludeFilter.- Since:
- 1.4.0
- See Also:
TypeExcludeFilter,TestConfiguration