ICode9

精准搜索请尝试: 精确搜索
  • 关于秒杀事务相关2022-07-04 00:04:55

    intern 锁对象 toString 后返回的是不同的 String 对象,需要用 intern 方法直接从常量池中调用字符串对象 synchronized (userId.toString().intern()) proxy 使用 @Transaction 注解开启事务,spring 创建代理对象实现事务,但是在 service 中调用方法都是本身 this 调用,需要得到当前

专注分享技术,共同学习,共同进步。侵权联系[81616952@qq.com]

Copyright (C)ICode9.com, All Rights Reserved.

ICode9版权所有