Hibernate JPA and Spring javax.persistence.TransactionRequiredException: no transaction is in progress

后端 未结 13 2709
说谎
说谎 2020-12-05 17:52

When I call:

entityManager.flush()

I get the exception mentioned in the title.

I am using Hibernate JPA.

13条回答
  •  粉色の甜心
    2020-12-05 18:33

    Make sure that your spring configuration includes the following line:

    mode can be either proxy or aspectj and transaction-manager has to point to your transaction manager been.

提交回复
热议问题