1. 程式人生 > >新增語句<tx:annotation-driven transaction-manager="txManager"/>報錯

新增語句<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

有沒有新增的問題了。