From cf57f4a7552008027eec336f30985e20665639e4 Mon Sep 17 00:00:00 2001 From: fengshuonan Date: Fri, 24 Jun 2022 15:44:05 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=907.2.3=E3=80=91=E6=9B=B4=E6=96=B0?= =?UTF-8?q?=E7=99=BB=E5=BD=95=E8=BF=87=E7=A8=8B=E7=9A=84=E9=94=81=E6=94=B9?= =?UTF-8?q?=E4=B8=BA=E9=94=81=E7=BB=9F=E4=B8=80=E8=B4=A6=E5=8F=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../roses/kernel/auth/auth/AuthServiceImpl.java | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/kernel-d-auth/auth-sdk/src/main/java/cn/stylefeng/roses/kernel/auth/auth/AuthServiceImpl.java b/kernel-d-auth/auth-sdk/src/main/java/cn/stylefeng/roses/kernel/auth/auth/AuthServiceImpl.java index 5cd6fa220..4e3a9ccfc 100644 --- a/kernel-d-auth/auth-sdk/src/main/java/cn/stylefeng/roses/kernel/auth/auth/AuthServiceImpl.java +++ b/kernel-d-auth/auth-sdk/src/main/java/cn/stylefeng/roses/kernel/auth/auth/AuthServiceImpl.java @@ -70,7 +70,6 @@ import cn.stylefeng.roses.kernel.scanner.api.holder.InitScanFlagHolder; import cn.stylefeng.roses.kernel.security.api.DragCaptchaApi; import cn.stylefeng.roses.kernel.security.api.ImageCaptchaApi; import cn.stylefeng.roses.kernel.security.api.expander.SecurityConfigExpander; -import cn.stylefeng.roses.kernel.system.api.ResourceServiceApi; import cn.stylefeng.roses.kernel.system.api.UserServiceApi; import cn.stylefeng.roses.kernel.system.api.enums.UserStatusEnum; import cn.stylefeng.roses.kernel.system.api.pojo.user.UserLoginInfoDTO; @@ -95,11 +94,6 @@ import static cn.stylefeng.roses.kernel.auth.api.exception.enums.AuthExceptionEn @Service public class AuthServiceImpl implements AuthServiceApi { - /** - * 用于操作缓存时候加锁 - */ - private static final Object SESSION_OPERATE_LOCK = new Object(); - @Resource private UserServiceApi userServiceApi; @@ -124,9 +118,6 @@ public class AuthServiceImpl implements AuthServiceApi { @Resource private SsoProperties ssoProperties; - @Resource - private ResourceServiceApi resourceServiceApi; - @Resource(name = "loginErrorCountCacheApi") private CacheOperatorApi loginErrorCountCacheApi; @@ -367,7 +358,7 @@ public class AuthServiceImpl implements AuthServiceApi { // 如果包含租户编码,则放到loginUser中 loginUser.setTenantCode(loginRequest.getTenantCode()); - synchronized (SESSION_OPERATE_LOCK) { + synchronized (loginUser.getAccount().intern()) { // 9.1 获取ws-url 保存到用户信息中 loginUser.setWsUrl(WebSocketConfigExpander.getWebSocketWsUrl());