RequestContextHolder.getRequestAttributes always return null in resttemplate interceptor. #24567
Labels
for: stackoverflow
A question that's better suited to stackoverflow.com
status: invalid
An issue that we don't feel is valid
I have a spring cloud application which have multiple spring boot micro services. I'm using resttemplate to call other services in someone, and for security reason I use an interceptor to pass through the
Authorization
header. The full source code can be found at Spring Cloud in Practice.But the
requestAttrs
above is always null, and I see the request executed by resttemplate is not in the main thread. Does this is the reason and how can I solve this problem.Spring Boot: 2.2.2
Spring Cloud: Hoxton.SR1
The text was updated successfully, but these errors were encountered: