TransactionRequiredException Executing an update/delete query

后端 未结 20 2145
没有蜡笔的小新
没有蜡笔的小新 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条回答
  •  夕颜
    夕颜 (楼主)
    2020-12-02 15:51

    Faced the same problem, I simply forgot to activate the transaction management with the @EnableTransactionManagement annotation.

    Ref:

    https://docs.spring.io/spring-framework/docs/current/javadoc-api/org/springframework/transaction/annotation/EnableTransactionManagement.html

提交回复
热议问题