最佳答案
我正在从 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标记之间的区别是什么,以及在 Spring3配置文件中可以消除哪些内容?