首页
科技
登录
6mi
u
盘
搜
搜 索
科技
@Transactional中try-catch和this使用事务失效的解决方法
@Transactional中try-catch和this使用事务失效的解决方法
it
2022-05-05
111
//通过获取当前代理对象来代替this的方法去解决this导致事务失效的问题 ((BaseWithdrawBillService<BaseWithdrawBillPo, CashServiceFace>) AopContext.currentProxy()).returnAliAmount(id);
// 解决在try-catch中无法回滚事务的问题
TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
转载请注明原文地址: https://win8.8miu.com/read-23869.html
专利
最新回复
(
0
)