
我在spring-4.0.6和hibernate-4.3.6中遇到了这个问题。
解决方案是将所有注释驱动,组件扫描,注释驱动的指令从root-context.xml移至servlet-context.xml:
<mvc:annotation-driven /><context:component-scan base-package="ru.dd.demo" /><tx:annotation-driven transaction-manager="transactionManager" />
仍然可以在root-context.xml中定义dataSource,sessionFactory和transactionManager。
欢迎分享,转载请注明来源:内存溢出
微信扫一扫
支付宝扫一扫
评论列表(0条)