[AAI-2528] | Update to spring-boot 2.1.6.RELEASE
[aai/aai-common.git] / aai-rest / src / main / java / org / onap / aai / restclient / TwoWaySSLRestClient.java
index a69977f..58f2106 100644 (file)
@@ -62,7 +62,7 @@ public abstract class TwoWaySSLRestClient extends RestClient {
                 HttpClients.custom().setSSLContext(sslContext).setSSLHostnameVerifier((s, sslSession) -> true).build();
 
         restTemplate =
-                new RestTemplateBuilder().requestFactory(new HttpComponentsClientHttpRequestFactory(client)).build();
+            new RestTemplateBuilder().requestFactory(() -> new HttpComponentsClientHttpRequestFactory(client)).build();
 
         restTemplate.setErrorHandler(new RestClientResponseErrorHandler());