1 package org.onap.so.client.orchestration;
3 import org.onap.logging.filter.spring.SpringClientPayloadFilter;
4 import org.springframework.context.annotation.Bean;
5 import org.springframework.context.annotation.Configuration;
6 import org.springframework.http.client.BufferingClientHttpRequestFactory;
7 import org.springframework.http.client.HttpComponentsClientHttpRequestFactory;
8 import org.springframework.web.client.RestTemplate;
11 public class RestTemplateApiClientConfig {
12 public static final String REST_TEMPLATE_API_HANDLER = "restTemplateApiHandler";
14 @Bean(REST_TEMPLATE_API_HANDLER)
15 public RestTemplate restTemplate() {
16 final RestTemplate restTemplate = new RestTemplate();
18 .setRequestFactory(new BufferingClientHttpRequestFactory(new HttpComponentsClientHttpRequestFactory()));
19 restTemplate.getInterceptors().add((new SpringClientPayloadFilter()));