|
|
@@ -33,6 +33,7 @@ import org.springframework.cloud.client.loadbalancer.LoadBalanced;
|
|
|
import org.springframework.cloud.context.config.annotation.RefreshScope;
|
|
|
import org.springframework.context.annotation.Bean;
|
|
|
import org.springframework.context.annotation.Configuration;
|
|
|
+import org.springframework.context.annotation.Primary;
|
|
|
import org.springframework.http.client.ClientHttpRequestFactory;
|
|
|
import org.springframework.http.client.HttpComponentsClientHttpRequestFactory;
|
|
|
import org.springframework.http.client.Netty4ClientHttpRequestFactory;
|
|
|
@@ -80,6 +81,7 @@ public class HttpClientConfig {
|
|
|
*
|
|
|
*/
|
|
|
@Bean(name = "simpleRestTemplate")
|
|
|
+ @Primary
|
|
|
public RestTemplate simpleRestTemplate() {
|
|
|
SimpleClientHttpRequestFactory hf = new SimpleClientHttpRequestFactory();
|
|
|
hf.setConnectTimeout(5*60*1000);
|