注释类型 Controller
@Target(TYPE) @Retention(RUNTIME) @Documented @Component public @interface Controller
Indicates that an annotated class is a "Controller" (e.g. a web controller).This annotation serves as a specialization of
@Component
, allowing for implementation classes to be autodetected through classpath scanning. It is typically used in combination with annotated handler methods based on theRequestMapping
annotation.- 从以下版本开始:
- 2.5
- 作者:
- Arjen Poutsma, Juergen Hoeller
- 另请参阅:
Component
,RequestMapping
,ClassPathBeanDefinitionScanner