注释类型 Component
@Target(TYPE) @Retention(RUNTIME) @Documented @Indexed public @interface Component
Indicates that an annotated class is a "component". Such classes are considered as candidates for auto-detection when using annotation-based configuration and classpath scanning.Other class-level annotations may be considered as identifying a component as well, typically a special kind of component: e.g. the
@Repository
annotation or AspectJ's@Aspect
annotation.- 从以下版本开始:
- 2.5
- 作者:
- Mark Fisher
- 另请参阅:
Repository
,Service
,Controller
,ClassPathBeanDefinitionScanner