Bootstrap

TypeError: Failed to execute setRequestHeader on XMLHttpRequest : String contains non ISO-8859-1

首先查看给定的token是否正确

其次查看ajax中前端代码是否正确,因为需要根据JwtAuthenticationTokenFilter的格式

 String token = request.getHeader("Authorization");
        if (!StringUtils.hasText(token) || !token.startsWith("Bearer ")) {
            filterChain.doFilter(request, response);
            return;
        }

最后查看后端与token加密的有关代码

;