Merge "set a default bean for RestTemplate"
authorSteve Smokowski <ss835w@att.com>
Wed, 27 Mar 2019 20:09:36 +0000 (20:09 +0000)
committerGerrit Code Review <gerrit@onap.org>
Wed, 27 Mar 2019 20:09:36 +0000 (20:09 +0000)
common/src/main/java/org/onap/so/client/RestTemplateConfig.java

index 34ad6ef..0633ae7 100644 (file)
@@ -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