Commit cb40ea31 by fengshuonan

去掉handler的检查

parent f50160b7
...@@ -21,7 +21,6 @@ import cn.stylefeng.guns.core.util.JwtTokenUtil; ...@@ -21,7 +21,6 @@ import cn.stylefeng.guns.core.util.JwtTokenUtil;
import cn.stylefeng.roses.core.reqres.response.ErrorResponseData; import cn.stylefeng.roses.core.reqres.response.ErrorResponseData;
import cn.stylefeng.roses.core.util.RenderUtil; import cn.stylefeng.roses.core.util.RenderUtil;
import io.jsonwebtoken.JwtException; import io.jsonwebtoken.JwtException;
import org.springframework.web.method.HandlerMethod;
import org.springframework.web.servlet.handler.HandlerInterceptorAdapter; import org.springframework.web.servlet.handler.HandlerInterceptorAdapter;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
...@@ -41,11 +40,10 @@ public class RestApiInteceptor extends HandlerInterceptorAdapter { ...@@ -41,11 +40,10 @@ public class RestApiInteceptor extends HandlerInterceptorAdapter {
if (handler instanceof org.springframework.web.servlet.resource.ResourceHttpRequestHandler) { if (handler instanceof org.springframework.web.servlet.resource.ResourceHttpRequestHandler) {
return true; return true;
} }
HandlerMethod handlerMethod = (HandlerMethod) handler; return check(request, response);
return check(request, response, handlerMethod);
} }
private boolean check(HttpServletRequest request, HttpServletResponse response, HandlerMethod handlerMethod) { private boolean check(HttpServletRequest request, HttpServletResponse response) {
if (request.getServletPath().equals(JwtConstants.AUTH_PATH)) { if (request.getServletPath().equals(JwtConstants.AUTH_PATH)) {
return true; return true;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment