TransactionRequiredException Executing an update/delete query

后端 未结 20 2094
没有蜡笔的小新
没有蜡笔的小新 2020-12-02 15:29

Hi I am using hibernate JPA with spring and mongodb and i am running my application on Glassfish-4.0.

My service class is :

@Component
public class T         


        
20条回答
  •  萌比男神i
    2020-12-02 15:47

    I have also faced same issue when I work with Hibernate and Spring Jpa Data Repository. I forgot to place @Transactional on spring data repository method.

    Its working for me after annotating with @Transactional.

提交回复
热议问题