[AAI-2528] | Update to spring-boot 2.1.6.RELEASE
[aai/aai-common.git] / aai-rest / src / main / java / org / onap / aai / restclient / NoAuthRestClient.java
index b5a0101..31dd0c9 100644 (file)
@@ -41,7 +41,7 @@ public abstract class NoAuthRestClient extends RestClient {
     public void init() throws Exception {
         HttpClient client = HttpClients.createDefault();
         restTemplate =
-                new RestTemplateBuilder().requestFactory(new HttpComponentsClientHttpRequestFactory(client)).build();
+            new RestTemplateBuilder().requestFactory(() -> new HttpComponentsClientHttpRequestFactory(client)).build();
 
         restTemplate.setErrorHandler(new RestClientResponseErrorHandler());
     }