springcloud分布式服务脏读死锁解决方案

解决springcloud分布式服务脏读死锁等异常

查询更新同一张表时,需要采用select...for update进行行级锁

//设置事务传播特性及隔离级别
@Transactional(propagation = Propagation.REQUIRED, isolation = Isolation.DEFAULT, rollbackFor = {Throwable.class})
select
refid="Base_Column_List" />
from t_account_detail t
where t.user_id = #{userId}
for update;

你可能感兴趣的:(framework,springcloud)