diff --git a/src/main/java/aiyh/utils/lock/LockUtils.java b/src/main/java/aiyh/utils/lock/LockUtils.java index c06d8e9..0967be0 100644 --- a/src/main/java/aiyh/utils/lock/LockUtils.java +++ b/src/main/java/aiyh/utils/lock/LockUtils.java @@ -5,9 +5,9 @@ import aiyh.utils.excention.CustomerException; import cn.hutool.core.thread.ThreadUtil; import ebu7common.youhong.ai.bean.Builder; -import java.util.HashMap; import java.util.Map; import java.util.Objects; +import java.util.concurrent.ConcurrentHashMap; /** *

分布式锁

@@ -21,7 +21,7 @@ public class LockUtils { private static final LockUtilMapper mapper = Util.getMapper(LockUtilMapper.class); - private static final Map LOCK_MAP = new HashMap<>(); + private static final Map LOCK_MAP = new ConcurrentHashMap<>(); /** 默认过期时间 10s */ private static final Long DEFAULT_OVERDUE_TIME = 1_000 * 10L;