lyhzzz 2 rokov pred
rodič
commit
77f22d7cf3

+ 1 - 1
src/main/java/com/fdkankan/ucenter/service/impl/LoginLogServiceImpl.java

@@ -26,7 +26,7 @@ public class LoginLogServiceImpl extends ServiceImpl<ILoginLogMapper, LoginLog>
     RedisUtil redisUtil;
 
     @Override
-    public void addLog(String clientIP, String token) {
+    public synchronized void addLog(String clientIP, String token) {
         try {
             String tokenKey = "ucenter:active:token:"+ token;
             if(redisUtil.hasKey(tokenKey)){