会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
DaleyZou's Blog
------因为来时的路不可能回头
首页
联系
管理
08 2022 档案
synchronized 使用 String 做锁定互斥
摘要:背景 根据方法传入的字符串,做相同字符串的互斥操作 思路 1、使用 string.intern() 方法 -- 不推荐 2、自己定义个工厂 自己使用工厂实现 实现 package com.example.demo; import lombok.Data; import org.springframe
阅读全文
posted @
2022-08-05 12:07
DaleyZou
阅读(120)
评论(0)
推荐(0)
公告