aboutsummaryrefslogtreecommitdiffstats
path: root/bpmn/MSOCommonBPMN/src/main/java/org/onap
diff options
context:
space:
mode:
authorSmokowski, Steve (ss835w) <ss835w@us.att.com>2018-09-20 11:04:00 -0400
committerSmokowski, Steve (ss835w) <ss835w@us.att.com>2018-09-20 11:08:27 -0400
commitc4347b25ddf03c4f8e25b9443e0e25be102d0ba6 (patch)
tree50602a362db32978814e185d84227634418215b1 /bpmn/MSOCommonBPMN/src/main/java/org/onap
parent19659e205ef636cec767e32a62cc549cf9156d5b (diff)
Update Logging
Update logging to meet Casablanca Spec Change-Id: I029d6c63765992d6f091d96e2b4c34c60d30c484 Issue-ID: SO-947 Signed-off-by: Smokowski, Steve (ss835w) <ss835w@us.att.com>
Diffstat (limited to 'bpmn/MSOCommonBPMN/src/main/java/org/onap')
-rw-r--r--bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/common/baseclient/BaseClient.java8
1 files changed, 5 insertions, 3 deletions
diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/common/baseclient/BaseClient.java b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/common/baseclient/BaseClient.java
index c3511e69a4..78f3e96978 100644
--- a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/common/baseclient/BaseClient.java
+++ b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/common/baseclient/BaseClient.java
@@ -20,13 +20,14 @@
package org.onap.so.bpmn.common.baseclient;
+import org.onap.so.logging.jaxrs.filter.SpringClientFilter;
import org.springframework.core.ParameterizedTypeReference;
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.SimpleClientHttpRequestFactory;
+import org.springframework.http.client.HttpComponentsClientHttpRequestFactory;
import org.springframework.web.client.RestClientException;
import org.springframework.web.client.RestTemplate;
@@ -59,11 +60,12 @@ public class BaseClient<I,O> {
public O post(I data, ParameterizedTypeReference<O> typeRef, Object... uriVariables) throws RestClientException {
return run(data, HttpMethod.POST, typeRef, uriVariables);
}
-
+
public O run(I data, HttpMethod method, ParameterizedTypeReference<O> typeRef, Object... uriVariables) throws RestClientException {
HttpEntity<I> requestEntity = new HttpEntity<I>(data, getHttpHeader());
RestTemplate restTemplate = new RestTemplate();
- restTemplate.setRequestFactory(new BufferingClientHttpRequestFactory(new SimpleClientHttpRequestFactory()));
+ restTemplate.setRequestFactory(new BufferingClientHttpRequestFactory(new HttpComponentsClientHttpRequestFactory()));
+ restTemplate.getInterceptors().add(new SpringClientFilter());
ResponseEntity<O> responseEntity = restTemplate.exchange(getTargetUrl(), method, requestEntity, typeRef,
uriVariables);
return responseEntity.getBody();