aboutsummaryrefslogtreecommitdiffstats
path: root/adapters
diff options
context:
space:
mode:
authorSteve Smokowski <ss835w@att.com>2019-07-29 12:38:12 +0000
committerGerrit Code Review <gerrit@onap.org>2019-07-29 12:38:12 +0000
commit4ad529ac7301498f1ec153936cf14e8446288314 (patch)
tree96bd54c2015bb1a37a18ec29efe7bb50396171aa /adapters
parent21efdd9394ac85637eb9e3531e0b78d7f1f09d41 (diff)
parent61b1a3f28b9641bba7702119fa6eda26d820d295 (diff)
Merge "Add SpringClientFilter in ValetClient to autolog"
Diffstat (limited to 'adapters')
-rw-r--r--adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/valet/ValetClient.java12
1 files changed, 6 insertions, 6 deletions
diff --git a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/valet/ValetClient.java b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/valet/ValetClient.java
index 34177ff5a3..3c073af6ba 100644
--- a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/valet/ValetClient.java
+++ b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/valet/ValetClient.java
@@ -48,10 +48,10 @@ import org.springframework.http.HttpEntity;
import org.springframework.http.HttpHeaders;
import org.springframework.http.HttpMethod;
import org.springframework.http.ResponseEntity;
-import org.springframework.http.client.BufferingClientHttpRequestFactory;
-import org.springframework.http.client.HttpComponentsClientHttpRequestFactory;
import org.springframework.stereotype.Component;
import org.springframework.web.client.RestTemplate;
+import org.onap.so.client.RestTemplateConfig;
+import javax.inject.Provider;
@Component
public class ValetClient {
@@ -75,6 +75,9 @@ public class ValetClient {
private static final String BODY = ", body=";
@Autowired
private ObjectMapper mapper;
+ @Autowired
+ private Provider<RestTemplate> templateProvider;
+
protected String baseUrl;
protected String basePath;
@@ -123,10 +126,7 @@ public class ValetClient {
}
private RestTemplate getRestTemplate() {
- RestTemplate restTemplate = new RestTemplate();
- restTemplate
- .setRequestFactory(new BufferingClientHttpRequestFactory(new HttpComponentsClientHttpRequestFactory()));
- return restTemplate;
+ return templateProvider.get();
}
/*