is there a way to force a transactional rollback without encountering an exception?

后端 未结 8 1976
鱼传尺愫
鱼传尺愫 2020-12-13 00:34

I have a method that does a bunch of things; amongst them doing a number of inserts and updates. It\'s declared thusly...

@Transactional(propagation = Propag         


        
8条回答
  •  隐瞒了意图╮
    2020-12-13 00:35

    You should have spring inject the transactional manager. Then you can just call the rollback method on it.

提交回复
热议问题