Spring JPA no transaction is in progress

前端 未结 3 2140
轮回少年
轮回少年 2020-12-14 08:23

I am new to Spring and JPA, wasted 5 days and no result with searching internet. I want to save object to SQL SERVER, connection is correct but when I write .flush() I get t

3条回答
  •  悲哀的现实
    2020-12-14 09:12

    To make the story short, try adding @Transactional at the very beginning of your method. That was an issue in my case.

提交回复
热议问题