添加语句<tx:annotation-driven transaction-manager="txManager"/>报错

在添加<tx:annotation-driven transaction-manager="txManager"/>程序之前,applicationContext.xml是读取正常的,其他代码也是正确运行的。

因为新接触spring,所以不知道spring的事务管理器也是需要引入包的,引入包以后就解决了问题。

还有可能出错的地方,在applicationContext.xml加入这句话时,就发生错误,这种情况就是

 http://www.springframework.org/schema/tx
      http://www.springframework.org/schema/tx/spring-tx-3.0.xsd

有没有添加的问题了。

posted @ 2018-11-01 21:50  寒潭渡鹤影  阅读(4033)  评论(0编辑  收藏  举报