spring整合hibernate的時候使用session的時候報:is not valid without active transaction

在使用spring整合hibernate的,然後測試環境的時候報錯:org.hibernate.HibernateException: save is not valid without active transaction 我使用的環境是spring4.3.*和hibernate5版本。以下是示例代碼: 此時運行測試會報:org.hibernate.HibernateException: sav
相關文章
相關標籤/搜索