Your Name
2023-06-28 195af63ae984ba0766b56d31d309b0da0381b19b
springboot/src/main/java/com/java110/boot/filter/JwtFilter.java
@@ -79,6 +79,7 @@
        } catch (Exception e) {
            //response.sendRedirect("/flow/login");
            logger.error("业务处理失败", e);
            noLogin(request,response);
        }
    }
@@ -105,9 +106,11 @@
     */
    private String getToken(HttpServletRequest request) throws FilterException {
        String token = "";
        for (Cookie cookie : request.getCookies()) {
            if (CommonConstant.COOKIE_AUTH_TOKEN.equals(cookie.getName())) {
                token = cookie.getValue();
        if (request.getCookies() != null && request.getCookies().length > 0) {
            for (Cookie cookie : request.getCookies()) {
                if (CommonConstant.COOKIE_AUTH_TOKEN.equals(cookie.getName())) {
                    token = cookie.getValue();
                }
            }
        }
@@ -115,7 +118,6 @@
        if(StringUtil.isEmpty(token) && !StringUtil.isEmpty(authorization)){
            token = authorization.substring("Bearer ".length());
            System.out.printf(">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>token="+token);
        }
        if (StringUtil.isNullOrNone(token)) {