Class RestTemplate

  • All Implemented Interfaces:
    org.springframework.beans.factory.InitializingBean, org.springframework.web.client.RestOperations

    public class RestTemplate
    extends org.springframework.web.client.RestTemplate
    implements org.springframework.beans.factory.InitializingBean
    Simple extension of RestTemplate that adds the following custom functionality:

    Author:
    avasquez
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected Class<?> errorResponseType  
      • Fields inherited from class org.springframework.http.client.support.HttpAccessor

        logger
    • Constructor Summary

      Constructors 
      Constructor Description
      RestTemplate()  
      RestTemplate​(List<org.springframework.http.converter.HttpMessageConverter<?>> messageConverters)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void afterPropertiesSet()  
      void setErrorResponseType​(Class<?> errorResponseType)  
      • Methods inherited from class org.springframework.web.client.RestTemplate

        acceptHeaderRequestCallback, delete, delete, delete, doExecute, exchange, exchange, exchange, exchange, exchange, exchange, exchange, exchange, execute, execute, execute, getErrorHandler, getForEntity, getForEntity, getForEntity, getForObject, getForObject, getForObject, getMessageConverters, getUriTemplateHandler, handleResponse, headersExtractor, headForHeaders, headForHeaders, headForHeaders, httpEntityCallback, httpEntityCallback, optionsForAllow, optionsForAllow, optionsForAllow, patchForObject, patchForObject, patchForObject, postForEntity, postForEntity, postForEntity, postForLocation, postForLocation, postForLocation, postForObject, postForObject, postForObject, put, put, put, responseEntityExtractor, setDefaultUriVariables, setErrorHandler, setMessageConverters, setUriTemplateHandler
      • Methods inherited from class org.springframework.http.client.support.InterceptingHttpAccessor

        getInterceptors, getRequestFactory, setInterceptors, setRequestFactory
      • Methods inherited from class org.springframework.http.client.support.HttpAccessor

        createRequest, getClientHttpRequestInitializers, setClientHttpRequestInitializers
    • Field Detail

      • errorResponseType

        protected Class<?> errorResponseType
    • Constructor Detail

      • RestTemplate

        public RestTemplate()
      • RestTemplate

        public RestTemplate​(List<org.springframework.http.converter.HttpMessageConverter<?>> messageConverters)
    • Method Detail

      • setErrorResponseType

        public void setErrorResponseType​(Class<?> errorResponseType)
      • afterPropertiesSet

        public void afterPropertiesSet()
        Specified by:
        afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean