|
@@ -1,5 +1,7 @@
|
|
package com.szwl.aspect;
|
|
package com.szwl.aspect;
|
|
|
|
|
|
|
|
+import cn.hutool.core.util.StrUtil;
|
|
|
|
+import com.szwl.constant.ConfigConsts;
|
|
import com.szwl.constant.ResponseCodesEnum;
|
|
import com.szwl.constant.ResponseCodesEnum;
|
|
import com.szwl.exception.BizException;
|
|
import com.szwl.exception.BizException;
|
|
import com.szwl.manager.TokenManager;
|
|
import com.szwl.manager.TokenManager;
|
|
@@ -24,7 +26,9 @@ public class HeadTokenInterceptor implements HandlerInterceptor {
|
|
public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception {
|
|
public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception {
|
|
String uri = request.getRequestURI();
|
|
String uri = request.getRequestURI();
|
|
log.info("preHandle uri:{}",uri);
|
|
log.info("preHandle uri:{}",uri);
|
|
- if(tokenManager.checkToken(request)){
|
|
|
|
|
|
+ String ifFeign = request.getHeader(ConfigConsts.INNER_FEIGN);
|
|
|
|
+ boolean checkToken = tokenManager.checkToken(request);
|
|
|
|
+ if(checkToken|| StrUtil.equals("1",ifFeign)){
|
|
return true;
|
|
return true;
|
|
}
|
|
}
|
|
throw new BizException(ResponseCodesEnum.L0006);
|
|
throw new BizException(ResponseCodesEnum.L0006);
|