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