@Transactional注解事务手动回滚
@Transactional(rollbackFor = Exception.class) public void rollbackTransactional() { try { //- xxx } catch (Exception e) { TransactionAspectSupport.currentTransactionStatus().setRollbackOnly(); //手动回滚事务 e.printStackTrace(); } }