summaryrefslogtreecommitdiffstats
path: root/aai-rest
diff options
context:
space:
mode:
authorHarish Venkata Kajur <vk250x@att.com>2020-02-26 17:38:15 -0500
committerjimmy <jf2512@att.com>2020-03-03 16:54:47 -0500
commit6f0577db0cc8bd169d5d420e22b576397817f8bd (patch)
tree22c084b168ba2b3452097dec34c36dc0fbddf9f1 /aai-rest
parent7c57239a9ccc5ae1d33873e62b9798fafb66b360 (diff)
Update aai-common to be spring boot 2 compatible
Issue-ID: AAI-2806 Change-Id: Idad79373209ef25bb26551253aa8ad86e4a75549 Signed-off-by: Harish Venkata Kajur <vk250x@att.com>
Diffstat (limited to 'aai-rest')
-rw-r--r--aai-rest/pom.xml2
-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
4 files changed, 8 insertions, 8 deletions
diff --git a/aai-rest/pom.xml b/aai-rest/pom.xml
index 18b74149..dbcb874a 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.8-SNAPSHOT</version>
+ <version>1.6.9-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 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);