批注接口 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
.
- 从以下版本开始:
- 1.4.0
- 作者:
- Phillip Webb
- 另请参阅:
-
可选元素概要
可选元素
-
元素详细资料
-
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.- 返回:
- the specified bean name, if any
- 默认值:
""
-