List of usage examples for org.springframework.http.client.support InterceptingHttpAccessor getInterceptors
public List<ClientHttpRequestInterceptor> getInterceptors()
From source file:io.jmnarloch.spring.request.correlation.http.ClientHttpCorrelationConfiguration.java
@Bean public InitializingBean clientsCorrelationInitializer(final RequestCorrelationProperties properties) { return new InitializingBean() { @Override//from w w w .ja va 2 s .c om public void afterPropertiesSet() throws Exception { if (clients != null) { for (InterceptingHttpAccessor client : clients) { final List<ClientHttpRequestInterceptor> interceptors = new ArrayList<>( client.getInterceptors()); interceptors.add(new ClientHttpRequestCorrelationInterceptor(properties)); client.setInterceptors(interceptors); } } } }; }