I'm using a Feign configuration class, declared using the annotations like so;
@FeignClient(name = "${earfsdf}", configuration = FeignConf.class)
FeignConf in this case is not a Spring @Configuration, it's purely scoped for this Feign client using the above annotation. In the FeignConf, I'm declaring a RequestInterceptor bean;
@Bean
public RequestInterceptor requestInterceptor() {
This gets picked up by Feign correctly, and it's called when I make the request on the Feign client.
However, I want this RequestInterceptor bean to be able to access the Spring "RequestAttributes", which I'm trying to obtain using Spring's RequestContextHolder.getRequestAttributes()
It seems that when I call this from within the RequestInterceptor, it returns null. Is there some way I can propagate the RequestAttributes into the Feign RequestInterceptor to be available?
Thanks!