原文:spring整合hibernate的時候報異常org.hibernate.HibernateException: createQuery is not valid without active transaction

在整合Spring hibernate 時候,當代碼執行到dao中CRUD操作時,報了一個異常, org.hibernate.HibernateException: createQuery is not valid without active transaction ... 因為我用到的是session是通過sessionFactory.getCurrentSession 方法獲得到的,這個s ...

2016-03-17 13:22 0 3547 推薦指數:

查看詳情

 
粵ICP備18138465號   © 2018-2026 CODEPRJ.COM