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

后端 未结 8 1982
鱼传尺愫
鱼传尺愫 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:41

    Throw an exception and use the framework as designed otherwise do not use declarative transaction management and follow skaffman advise above. Keep it simple.

提交回复
热议问题