diff options
Diffstat (limited to 'aai-rest')
4 files changed, 8 insertions, 8 deletions
diff --git a/aai-rest/pom.xml b/aai-rest/pom.xml index dbcb874a..89d3d3c2 100644 --- a/aai-rest/pom.xml +++ b/aai-rest/pom.xml @@ -29,7 +29,7 @@ <parent> <groupId>org.onap.aai.aai-common</groupId> <artifactId>aai-parent</artifactId> - <version>1.6.9-SNAPSHOT</version> + <version>1.6.10-SNAPSHOT</version> <relativePath>../aai-parent/pom.xml</relativePath> </parent> <artifactId>aai-rest</artifactId> diff --git a/aai-rest/src/main/java/org/onap/aai/restclient/NoAuthRestClient.java b/aai-rest/src/main/java/org/onap/aai/restclient/NoAuthRestClient.java index b11b0333..68ff3e5e 100644 --- a/aai-rest/src/main/java/org/onap/aai/restclient/NoAuthRestClient.java +++ b/aai-rest/src/main/java/org/onap/aai/restclient/NoAuthRestClient.java @@ -26,7 +26,6 @@ import org.apache.http.client.HttpClient; import org.apache.http.impl.client.HttpClients; import org.onap.aai.aailog.filter.RestClientLoggingInterceptor; import org.springframework.boot.web.client.RestTemplateBuilder; -import org.springframework.http.client.ClientHttpRequestFactory; import org.springframework.http.client.HttpComponentsClientHttpRequestFactory; import org.springframework.web.client.RestTemplate; @@ -40,8 +39,8 @@ public abstract class NoAuthRestClient extends RestClient { @PostConstruct public void init() throws Exception { - restTemplate = new RestTemplate(); - restTemplate.setRequestFactory(this.getHttpRequestFactory()); + restTemplate = + new RestTemplateBuilder().requestFactory(this.getHttpRequestFactory()).build(); restTemplate.setErrorHandler(new RestClientResponseErrorHandler()); RestClientLoggingInterceptor loggingInterceptor = new RestClientLoggingInterceptor(); restTemplate.getInterceptors().add(loggingInterceptor); diff --git a/aai-rest/src/main/java/org/onap/aai/restclient/OneWaySSLRestClient.java b/aai-rest/src/main/java/org/onap/aai/restclient/OneWaySSLRestClient.java index 5c359e27..b2534f57 100644 --- a/aai-rest/src/main/java/org/onap/aai/restclient/OneWaySSLRestClient.java +++ b/aai-rest/src/main/java/org/onap/aai/restclient/OneWaySSLRestClient.java @@ -42,8 +42,8 @@ public abstract class OneWaySSLRestClient extends RestClient { @PostConstruct public void init() throws Exception { - restTemplate = new RestTemplate(); - restTemplate.setRequestFactory(this.getHttpRequestFactory()); + restTemplate = + new RestTemplateBuilder().requestFactory(this.getHttpRequestFactory()).build(); restTemplate.setErrorHandler(new RestClientResponseErrorHandler()); RestClientLoggingInterceptor loggingInterceptor = new RestClientLoggingInterceptor(); diff --git a/aai-rest/src/main/java/org/onap/aai/restclient/TwoWaySSLRestClient.java b/aai-rest/src/main/java/org/onap/aai/restclient/TwoWaySSLRestClient.java index f43d21c8..58ee79f1 100644 --- a/aai-rest/src/main/java/org/onap/aai/restclient/TwoWaySSLRestClient.java +++ b/aai-rest/src/main/java/org/onap/aai/restclient/TwoWaySSLRestClient.java @@ -48,8 +48,9 @@ public abstract class TwoWaySSLRestClient extends RestClient { @PostConstruct public void init() throws Exception { - restTemplate = new RestTemplate(); - restTemplate.setRequestFactory(this.getHttpRequestFactory()); + restTemplate = + new RestTemplateBuilder().requestFactory(this.getHttpRequestFactory()).build(); + restTemplate.setErrorHandler(new RestClientResponseErrorHandler()); RestClientLoggingInterceptor loggingInterceptor = new RestClientLoggingInterceptor(); restTemplate.getInterceptors().add(loggingInterceptor); |