We are developing a set of microservices using the Spring Cloud infrastructure, and one of the things we need is to set request headers. I know that I can pass the parameter @RequestHeaderto the Feign method, but the value must be obtained from another bean. I do not know if SPEL can be used for the value of the Feign parameter. I thought this was a fairly common use case for most clients, so there are examples, but so far I have not found them. Of course, I can dig through the Spring course code and try to override the default configuration, but it just defeats the goal of the declarative client if I need to write a lot of code for this. Any thoughts?
source
share