Package es.kukenan.smartfi.common.utils
Class RestTemplateFactory
java.lang.Object
es.kukenan.smartfi.common.utils.RestTemplateFactory
Rest template factory, used to create new configured Rest Templates.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate org.springframework.boot.web.client.RestTemplateBuilderCreate theRestTemplateBuilderfor internal usage.org.springframework.web.client.RestTemplateCreate a new RestTemplate.org.springframework.web.client.RestTemplaterestTemplate(org.springframework.web.client.ResponseErrorHandler responseErrorHandler) Create a new RestTemplate.
-
Field Details
-
proxyHost
Proxy host. -
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 theRestTemplateBuilderfor internal usage.- Returns:
- the
RestTemplateBuilderfor internal usage.
-