@Override
	public Object postProcessAfterInitialization(Object bean, String beanName) {
		// RestTemplate et getInterceptors() existent depuis spring-web 3.1.0.RELEASE
		if (REST_TEMPLATE_INTERCEPTOR_AVAILABLE && bean instanceof RestTemplate) {
			final RestTemplate restTemplate = (RestTemplate) bean;
			final List<ClientHttpRequestInterceptor> interceptors = new ArrayList<ClientHttpRequestInterceptor>(
					restTemplate.getInterceptors());
			for (final ClientHttpRequestInterceptor interceptor : interceptors) {
				if (interceptor instanceof SpringRestTemplateInterceptor) {
					return bean;
				}
			}
			interceptors.add(SpringRestTemplateInterceptor.SINGLETON);
			restTemplate.setInterceptors(interceptors);
		}

		return bean;
	}
@ Override public Object postProcessAfterInitialization ( Object bean , String beanName ) { if ( REST_TEMPLATE_INTERCEPTOR_AVAILABLE && bean instanceof RestTemplate ) { final RestTemplate restTemplate = ( RestTemplate ) bean ; final List < ClientHttpRequestInterceptor > interceptors = new ArrayList < ClientHttpRequestInterceptor > ( restTemplate . getInterceptors ( ) ) ; for ( final ClientHttpRequestInterceptor interceptor : interceptors ) { if ( interceptor instanceof SpringRestTemplateInterceptor ) { return bean ; } } interceptors . add ( SpringRestTemplateInterceptor . SINGLETON ) ; restTemplate . setInterceptors ( interceptors ) ; } return bean ; }
{@inheritDoc}