@Transactional注解只有在接收到throw时才会自动回滚,否则需要手动回滚
手动回滚方法。
@Transactional(propagation = Propagation.REQUIRED, isolation = Isolation.DEFAULT)
TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
@Transactional注解只有在接收到throw时才会自动回滚,否则需要手动回滚
手动回滚方法。
@Transactional(propagation = Propagation.REQUIRED, isolation = Isolation.DEFAULT)
TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();