Class RestTemplatePostProcessor

  • All Implemented Interfaces:
    org.springframework.beans.factory.config.BeanPostProcessor

    @Configuration
    public class RestTemplatePostProcessor
    extends Object
    implements org.springframework.beans.factory.config.BeanPostProcessor
    Takes care of adding @RestTemplateInterceptor to all the RestTemplate beans to automatically handle client-side load balancing
    Since:
    1.2.0-rc2-SNAPSHOT
    Author:
    Anusha
    • Constructor Detail

      • RestTemplatePostProcessor

        public RestTemplatePostProcessor()
    • Method Detail

      • simpleClientHttpRequestFactory

        @Bean
        public org.springframework.http.client.SimpleClientHttpRequestFactory simpleClientHttpRequestFactory()
      • postProcessBeforeInitialization

        public Object postProcessBeforeInitialization​(Object bean,
                                                      String beanName)
                                               throws org.springframework.beans.BeansException
        Specified by:
        postProcessBeforeInitialization in interface org.springframework.beans.factory.config.BeanPostProcessor
        Throws:
        org.springframework.beans.BeansException
      • postProcessAfterInitialization

        public Object postProcessAfterInitialization​(Object bean,
                                                     String beanName)
                                              throws org.springframework.beans.BeansException
        Specified by:
        postProcessAfterInitialization in interface org.springframework.beans.factory.config.BeanPostProcessor
        Throws:
        org.springframework.beans.BeansException