<context:annotation-config>  相对于注册

AutowiredAnnotationBeanPostProcessor、CommonAnnotationBeanPostProcessor、

PersistenceAnnotationBeanPostProcessor 以及 RequiredAnnotationBeanPostProcessor 这 4 个BeanPostProcessor。

支持的注解为: @Required, @Autowired, @PostConstruct 等, 使用了<context:component-scan/> 后就可以将该配置移除。
<mvc:annotation-driven/>相当于注册了DefaultAnnotationHandlerMapping和AnnotationMethodHandlerAdapter两个bean,配置一些messageconverter。即解决了@Controller注解的使用前提配置。

相关文章:

  • 2021-10-02
  • 2021-12-11
  • 2021-10-04
  • 2021-09-20
  • 2021-10-02
猜你喜欢
  • 2021-05-26
  • 2021-08-05
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-05-01
  • 2021-12-05
相关资源
相似解决方案