title: 'Global' Feign Interceptor not picked up by all Feign Clients
body: <p>We are using Open Feign in our application, which is running on Spring Boot 2.0.6 and Spring Cloud Finchley.SR2.</p>
  
  <p>We need all of the Feign Clients to add a token from the security context in the header of every call, so we created a configuration, which produces a global Interceptor for all clients:</p>
  
  <pre><code>@Configuration
  @Import({FeignClientsConfiguration.class})
  public class FeignConfig {
  
     @Value("${a.spring.config}")
     private int minTokenLifespan;
  
     @Autowired
     private OAuthContext oAuthContext;
  
     @Autowired
     private AuthManager authManager;
  
     @Bean
     public RequestInterceptor myCustomInterceptor() {
         return new CustomInterceptor(oAuthContext, authManager, minTokenLifespan);
     }
  }
  </code></pre>
  
  <p>The interceptor works for all Feign Clients but one. In the debugger we can see, that this special feign client (along with its the SynchronousMessageHandler) is created, <em>before</em> the Bean is created in the class <code>FeignConfig</code>. The <code>CustomIntercepter</code> is only created after the first Feign Client, all other clients are created afterward, know of the Interceptors existence and will apply it. </p>
  
  <p>How can we debug this issue? Has anyone had a different problem in the past?</p>
  
  <p>I can't post production code, but I would be happy to answer any question and try to post obfuscated code.</p>