|
|
@ -63,10 +63,14 @@ public class AuthConfig implements WebMvcConfigurer { |
|
|
|
} |
|
|
|
} |
|
|
|
String token = request.getHeader("Authorization"); |
|
|
|
String token = request.getHeader("Authorization"); |
|
|
|
if(StringUtils.isNotBlank(token) && userCenter.isLogin(token)){//如果未登录,将无法使用任何接口
|
|
|
|
if(StringUtils.isNotBlank(token) && userCenter.isLogin(token)){//如果未登录,将无法使用任何接口
|
|
|
|
|
|
|
|
// 刷新登录缓存时间
|
|
|
|
|
|
|
|
userCenter.refresh(request); |
|
|
|
return true; |
|
|
|
return true; |
|
|
|
} else if(request instanceof StandardMultipartHttpServletRequest) { |
|
|
|
} else if(request instanceof StandardMultipartHttpServletRequest) { |
|
|
|
StandardMultipartHttpServletRequest re = (StandardMultipartHttpServletRequest)request; |
|
|
|
StandardMultipartHttpServletRequest re = (StandardMultipartHttpServletRequest)request; |
|
|
|
if(userCenter.isLogin(re.getRequest())){ |
|
|
|
if(userCenter.isLogin(re.getRequest())){ |
|
|
|
|
|
|
|
// 刷新登录缓存时间
|
|
|
|
|
|
|
|
userCenter.refresh(request); |
|
|
|
return true; |
|
|
|
return true; |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
log.error("the user is not logged in,remoteAddr:"+getIpAddress(request)+",requestUrl:"+request.getRequestURL()); |
|
|
|
log.error("the user is not logged in,remoteAddr:"+getIpAddress(request)+",requestUrl:"+request.getRequestURL()); |
|
|
|