Spring JPA no transaction is in progress

前端 未结 3 2098
轮回少年
轮回少年 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 08:55

    You should introduce your entity manager to your transaction manager, so that when you annotate your function with @Transactionalit loads instances from the pool

    
        
    
    
    

    HTH!

提交回复
热议问题