用@Transactional注解
@Transactional(rollbackFor = Exception.class)
在错误后加,抛出异常
throw new YBException(RetInfoUtil.buildRetinfo("xxx"));
这样出现异常后就会回滚
用@Transactional注解
@Transactional(rollbackFor = Exception.class)
在错误后加,抛出异常
throw new YBException(RetInfoUtil.buildRetinfo("xxx"));
这样出现异常后就会回滚