From be2e8c565b7976b81350e890df40c8d145340c28 Mon Sep 17 00:00:00 2001 From: "Benjamin, Max (mb388a)" Date: Wed, 27 Mar 2019 10:11:06 -0400 Subject: set a default bean for RestTemplate Change-Id: Ie32f5425d44f05fb5aa87e737aeabb393c978643 Issue-ID: SO-1706 Signed-off-by: Benjamin, Max (mb388a) --- common/src/main/java/org/onap/so/client/RestTemplateConfig.java | 2 ++ 1 file changed, 2 insertions(+) (limited to 'common/src/main') diff --git a/common/src/main/java/org/onap/so/client/RestTemplateConfig.java b/common/src/main/java/org/onap/so/client/RestTemplateConfig.java index 34ad6ef758..0633ae74c9 100644 --- a/common/src/main/java/org/onap/so/client/RestTemplateConfig.java +++ b/common/src/main/java/org/onap/so/client/RestTemplateConfig.java @@ -26,6 +26,7 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; +import org.springframework.context.annotation.Primary; import org.springframework.http.client.BufferingClientHttpRequestFactory; import org.springframework.http.client.HttpComponentsClientHttpRequestFactory; import org.springframework.web.client.RestTemplate; @@ -39,6 +40,7 @@ public class RestTemplateConfig { private HttpComponentsClientConfiguration httpComponentsClientConfiguration; @Bean + @Primary public RestTemplate restTemplate() { final RestTemplate restTemplate = new RestTemplate(); restTemplate -- cgit 1.2.3-korg