This commit is contained in:
zt
2025-05-12 09:43:54 +08:00
parent f04d495a9c
commit 88cd11228b
12 changed files with 354 additions and 5 deletions

View File

@ -102,7 +102,7 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter
.authorizeRequests()
// 对于登录login 验证码captchaImage 允许匿名访问
.antMatchers("/login", "/captchaImage","/demo/tress/all").anonymous()
.antMatchers("/app/login","/wgz/app/wgzRegister","/sse/subscribe",
.antMatchers("/app/login","/wgz/app/wgzRegister","/common/version/latest",
"/app/bgt/recruit/htmlList","/app/bgt/apply/htmlList","/common/annex/getHtmlWgzAnnex"
,"/download-folders","/upload-zip").permitAll()
.antMatchers(

View File

@ -67,7 +67,7 @@ public class TokenService {
String userKey = getTokenKey(type, userId);
LoginUser user = redisCache.getCacheObject(userKey);
// log.info("用户当前类型:{}", claims);
if(!uuid.equals(user.getToken())){
if(user==null || !uuid.equals(user.getToken())){
throw new BaseException("999","您的账号在其他设备登录");
}
return user;