优化
This commit is contained in:
@ -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(
|
||||
|
@ -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;
|
||||
|
Reference in New Issue
Block a user