Spring JPA: no transaction is in progress

后端 未结 2 1084
难免孤独
难免孤独 2021-01-13 03:50

I\'m having problems persisting entities in my Spring application. Just doing em.merge() finishes without errors but does not update the database, and trying

2条回答
  •  花落未央
    2021-01-13 04:55

    Add this to your datasource file/config

    hibernate.allow_update_outside_transaction: true

    It should work, but be sure of your production environment though

提交回复
热议问题