【发布时间】:2011-04-28 00:54:30
【问题描述】:
我正在从 Spring 2.5 迁移到 Spring 3。
他们介绍了<mvc:annotation-driven />,它具有一些黑魔法。这应该只在 servlet 配置文件中声明。
在 Spring 2.5 中,我刚刚使用了在 application-context.xml 和调度程序 servlet 配置 XML 中声明的 <context:annotation-config /> 和 <context:component-scan base='...'/> 标记以及要扫描的适当基础包。
所以我想知道 servlet 配置中的 mvc:annotation-driven 和 context:annotation-config 标记有什么区别,我可以在 Spring 3 配置文件中消除什么?
【问题讨论】:
标签: spring spring-mvc spring-3