No thread-bound request found: Are you referring to request attributes outside of an actual web request, or processing a request outside of the originally receiving thread? If you are actually operating within a web request and still receive this message, your code is probably running outside of DispatcherServlet: In this case, use RequestContextListener or RequestContextFilter to expose the current request.
场景描述:A服务利用RPC 调用B 服务, B 服务里请求了一个C服务的接口, 但是C服务需要接口授权,利用 HttpServletRequest request = ((ServletRequestAttributes) (RequestContextHolder.currentRequestAttributes())).getRequest(); 获取token, 就会出现这个问题,
解决: 换一中授权方式,直接生成了一个授权token, 不用RequestContextHolder 这种方式获取请求token