Class RestTemplateFactory

java.lang.Object
es.kukenan.smartfi.common.utils.RestTemplateFactory

public class RestTemplateFactory extends Object
Rest template factory, used to create new configured Rest Templates.
  • Field Details

    • proxyHost

      @Value("${external.proxy.host:#{null}}") private String proxyHost
      Proxy host.
    • proxyPort

      @Value("${external.proxy.port:#{null}}") private Integer proxyPort
      Proxy port.
  • Constructor Details

    • RestTemplateFactory

      public RestTemplateFactory()
  • Method Details

    • restTemplate

      public org.springframework.web.client.RestTemplate restTemplate(org.springframework.web.client.ResponseErrorHandler responseErrorHandler)
      Create a new RestTemplate.
      Parameters:
      responseErrorHandler - the error handler to configure in the rest template.
      Returns:
      RestTemplate
    • restTemplate

      public org.springframework.web.client.RestTemplate restTemplate()
      Create a new RestTemplate.
      Returns:
      RestTemplate
    • createRestTemplateBuilder

      private org.springframework.boot.web.client.RestTemplateBuilder createRestTemplateBuilder()
      Create the RestTemplateBuilder for internal usage.
      Returns:
      the RestTemplateBuilder for internal usage.