springboot手动回滚事务

方法上加@Transactional注解 1:: throw new RuntimeException(); 2:TransactionAspectSupport.currentTransactionStatus().setRollbackOnly(); 示例: @Transactional public int deleteStudentsById(Integer id) { Stu
相关文章
相关标签/搜索