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.

Author

Phillip Webb

Since

1.4.0

See also

Functions

Link copied to clipboard
abstract fun annotationType(): Class<out Annotation>
Link copied to clipboard
abstract fun equals(p: Any): Boolean
Link copied to clipboard
abstract fun hashCode(): Int
Link copied to clipboard
abstract fun toString(): String
Link copied to clipboard
@AliasFor(annotation = Component::class)
abstract fun value(): String
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.