Update aai-common to be spring boot 2 compatible
[aai/aai-common.git] / aai-rest / src / main / java / org / onap / aai / restclient / TwoWaySSLRestClient.java
index 58ee79f..f43d21c 100644 (file)
@@ -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);