title: Propagating correlation-id not working
body: <p>I have the problem that the correlation-id is not propagated from my first to the my second microservice. I started to implement a servlet filter, a context and a context-holder as follows:</p>
  
  <pre><code>@Component
  // Do not name bean "RequestContextFilter", otherwise filter will not work!
  public class CallContextFilter implements Filter {
  
  @Override
  public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain)
          throws IOException, ServletException {
  
      HttpServletRequest httpServletRequest = (HttpServletRequest) servletRequest;CallContextHolder.getContext().setCorrelationId(httpServletRequest.getHeader(CallContext.CORRELATION_ID));
  
    filterChain.doFilter(httpServletRequest, servletResponse);
  }
  
  @Override
  public void init(FilterConfig filterConfig) throws ServletException {
  }
  
  @Override
  public void destroy() {
  }
  }
  </code></pre>
  
  <hr>
  
  <pre><code>@Component
  @Getter
  @Setter
  public class CallContext {
     public static final String CORRELATION_ID = "correlation-id";
  
     private String correlationId = new String();
  }
  </code></pre>
  
  <hr>
  
  <pre><code> public class CallContextHolder {
  
  private static final ThreadLocal&lt;CallContext&gt; userContext = new ThreadLocal&lt;&gt;();
  
  public static final CallContext getContext() {
      CallContext context = userContext.get();
  
      if (context == null) {
          context = new CallContext();
          userContext.set(context);
      }
      return userContext.get();
  }
  
  }
  </code></pre>
  
  <p>Then, I implemented a RestTemplate bean as follows:</p>
  
  <pre><code>@Bean
  public RestTemplate getRestTemplate() {
      RestTemplate template = new RestTemplate();
      List&lt;ClientHttpRequestInterceptor&gt; interceptors = template.getInterceptors();
      interceptors.add(new CallContextInterceptor());
      return template;
  }
  </code></pre>
  
  <p>and the interceptor looks as follows:</p>
  
  <pre><code>public class CallContextInterceptor implements ClientHttpRequestInterceptor {
  
  @Override
  public ClientHttpResponse intercept(HttpRequest request, byte[] body, ClientHttpRequestExecution execution) throws IOException {
      HttpHeaders headers = request.getHeaders();
      headers.add(CallContext.CORRELATION_ID, CallContextHolder.getContext().getCorrelationId());
  
      return execution.execute(request, body);
  }
  }
  </code></pre>
  
  <p>When I call my endpoint, the servlet filter is executed and the correlation-id is stored in the CallContextHolder. So far, so good. However, the CallContextInterceptor seems to be called in an other thread and my ThreadLocal variable in the CallContextHolder is null. What I have to do to make this working?</p>
  
  <pre><code>@GetMapping("/ping")
  public String ping() {
      return pongRestTemplateClient.getPong();
  }
  </code></pre>