try catch与事务回滚@Transactional

service类上添加了@Transactional注解,try块代码里出错,需要回滚,需要catch块中抛出异常

可参考try catch与事务回滚@Transactional

posted @ 2021-06-28 23:13  AlphaJunS  阅读(546)  评论(0编辑  收藏  举报