summaryrefslogtreecommitdiffstats
path: root/aai-rest/src
diff options
context:
space:
mode:
authorJimmy Forsyth <jf2512@att.com>2020-03-10 11:25:48 -0400
committerJimmy Forsyth <jf2512@att.com>2020-03-10 12:24:35 -0400
commitd9a489527750074eb8dd42bd2d0cfaef5de7c86f (patch)
treebf2cad1d97282d96c50b979efa2b1e2ee10c31ba /aai-rest/src
parent6f0577db0cc8bd169d5d420e22b576397817f8bd (diff)
Move back to spring-boot 1.5 for bugfix
Issue-ID: AAI-2831 Signed-off-by: Jimmy Forsyth <jf2512@att.com> Change-Id: I1e3d278fe343e4f05cdfd71d2443aef19c8541c2
Diffstat (limited to 'aai-rest/src')
-rw-r--r--aai-rest/src/main/java/org/onap/aai/restclient/NoAuthRestClient.java5
-rw-r--r--aai-rest/src/main/java/org/onap/aai/restclient/OneWaySSLRestClient.java4
-rw-r--r--aai-rest/src/main/java/org/onap/aai/restclient/TwoWaySSLRestClient.java5
3 files changed, 7 insertions, 7 deletions
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);