<context:annotation-config> 与 <mvc:annotation-driven>间的区别
2016-03-08 11:15
471 查看
<context:annotation-config> 相对于注册
AutowiredAnnotationBeanPostProcessor、CommonAnnotationBeanPostProcessor、
PersistenceAnnotationBeanPostProcessor 以及 RequiredAnnotationBeanPostProcessor 这 4 个BeanPostProcessor。
支持的注解为: @Required, @Autowired, @PostConstruct 等, 使用了<context:component-scan/> 后就可以将该配置移除。
<mvc:annotation-driven/>相当于注册了DefaultAnnotationHandlerMapping和AnnotationMethodHandlerAdapter两个bean,配置一些messageconverter。即解决了@Controller注解的使用前提配置。
AutowiredAnnotationBeanPostProcessor、CommonAnnotationBeanPostProcessor、
PersistenceAnnotationBeanPostProcessor 以及 RequiredAnnotationBeanPostProcessor 这 4 个BeanPostProcessor。
支持的注解为: @Required, @Autowired, @PostConstruct 等, 使用了<context:component-scan/> 后就可以将该配置移除。
<mvc:annotation-driven/>相当于注册了DefaultAnnotationHandlerMapping和AnnotationMethodHandlerAdapter两个bean,配置一些messageconverter。即解决了@Controller注解的使用前提配置。
相关文章推荐
- c++ MFC 可改变时区的模拟时钟
- paho mqtt资源地址
- Ubuntu下Code::Blocks无法编译/bin/sh:1:g++ not
- iOS开发笔记--先弄清楚这里的学问,再来谈iOS内存管理与优化(一)
- error C1853: 'Debug\xxx.pch' precompiled header file is from a previous version of the compiler
- Android屏幕适配全攻略1-从dp、sp、px说起
- CountDownLatch
- Access denied for user: 'root@localhost' (Using password: YES)
- runtime基础教程(2)-OC的消息传递
- MinGW main()
- JS事件委托的原理和应用
- PAT1047编程团体赛(20)
- [Offer收割]编程练习赛1 hihocoder 1271 舰队游戏 (状态压缩+贪心 好题)
- Makefile中的-Wall -O2 -Os -g等选项介绍
- 越维护代码越感觉心惊肉跳的
- saiku 展示优化第二步(要诀和技巧)
- widget
- 19.CoreMotion(陀螺仪)
- Leetcode:172. Factorial Trailing Zeroes(JAVA)
- 一幅图秒懂LoadAverage(负载)