summaryrefslogtreecommitdiffstats
path: root/aai-rest/src
diff options
context:
space:
mode:
authorJimmy Forsyth <jf2512@att.com>2020-03-10 15:21:02 -0400
committerJimmy Forsyth <jf2512@att.com>2020-03-10 16:34:50 -0400
commited992e01c17d5677dfa0e1d0a76a7f9bc12c2a90 (patch)
tree085e36cce2b19afbde50139f34eb969001db91cd /aai-rest/src
parent2f4601f2b8fa2e219e870bfabe8d1c464e67dd69 (diff)
Reenable spring-boot2 in aai-common
Issue-ID: AAI-2831 Signed-off-by: Jimmy Forsyth <jf2512@att.com> Change-Id: I9f3f1d8d1d9ef45786d0f17afa5c824e90c77263
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 68ff3e5e..b11b0333 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,6 +26,7 @@ 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;
@@ -39,8 +40,8 @@ public abstract class NoAuthRestClient extends RestClient {
@PostConstruct
public void init() throws Exception {
- restTemplate =
- new RestTemplateBuilder().requestFactory(this.getHttpRequestFactory()).build();
+ restTemplate = new RestTemplate();
+ restTemplate.setRequestFactory(this.getHttpRequestFactory());
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 b2534f57..5c359e27 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 RestTemplateBuilder().requestFactory(this.getHttpRequestFactory()).build();
+ restTemplate = new RestTemplate();
+ restTemplate.setRequestFactory(this.getHttpRequestFactory());
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 58ee79f1..f43d21c8 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,9 +48,8 @@ public abstract class TwoWaySSLRestClient extends RestClient {
@PostConstruct
public void init() throws Exception {
- restTemplate =
- new RestTemplateBuilder().requestFactory(this.getHttpRequestFactory()).build();
-
+ restTemplate = new RestTemplate();
+ restTemplate.setRequestFactory(this.getHttpRequestFactory());
restTemplate.setErrorHandler(new RestClientResponseErrorHandler());
RestClientLoggingInterceptor loggingInterceptor = new RestClientLoggingInterceptor();
restTemplate.getInterceptors().add(loggingInterceptor);