HibernateException: Could not obtain transaction-synchronized Session for current thread

后端 未结 4 1159
被撕碎了的回忆
被撕碎了的回忆 2021-01-04 21:16

I am getting error:

Exception in thread \"main\" org.hibernate.HibernateException: 
Could not obtain transaction-synchronized Session for current thread
         


        
4条回答
  •  [愿得一人]
    2021-01-04 21:56

    I had same error as "org.hibernate.HibernateException: Could not obtain transaction-synchronized Session for current thread"

    I just used @Transactional(readOnly = false) in my Dao implementation resolved my issue

提交回复
热议问题