Write operations are not allowed in read-only mode (FlushMode.NEVER) - turn your Session into FlushM

在執行this.getHibernateTemplate().update(a);時,報出這個錯誤,錯誤提示很明顯,照網上的方法設置了很久也沒有搞定,大多是在web.xml中設置filter,但是並不奏效。最後在一篇博文回覆中看到了解決方法,通過在applicationContext.XML中設置事務傳播行爲類型 ,成功解決問題 再推薦給大家一篇文章,寫得很好http://blog.sina.co
相關文章
相關標籤/搜索