Autowire outbound RestTemplate's HttpEntity with inbound request headers
<p>My Spring Boot application will take in a request and part of its processing flow is to fire off some other requests to other RESTful microservices and massage the responses before sending it back to the requester.</p>

<p>The flow looks like this: </p>

<pre><code>Requester -&gt; My Controller -&gt; My Service -&gt; Upstream Service
            [    My Spring Boot Scope   ]
</code></pre>

<p>I use a <code>RestTemplate</code> to fire off the request to upstream services.</p>

<p>The inbound request that Requester sends will contain some headers such as <code>Authorization</code> and <code>CorrelationID</code>, which I need to grab and copy into the outbound <code>RestTemplate</code> request, which I would like to find a more efficient way to perform.</p>

<p>What I'm thinking of is to define an autowired <code>Request</code>-scoped  <code>HttpEntity</code> bean  which is <code>Request</code>-scoped in my <code>Configuration</code> class which will read the incoming headers and inject it into the <code>HttpEntity</code> bean. But I can't quite figure out how to read the request headers in the <code>Configuration</code> class itself. I don't want to do it at the controller level because that means every team member implementing a controller will need to do this.</p>

<p>Is this possible to achieve?</p>