src/main/java/com/whyc/config/HttpConifg.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
src/main/java/com/whyc/config/HttpConifg.java
@@ -2,6 +2,7 @@ import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Scope; import org.springframework.http.client.SimpleClientHttpRequestFactory; import org.springframework.web.client.RestTemplate; @@ -9,6 +10,7 @@ public class HttpConifg { @Bean @Scope("prototype") public RestTemplate getRestTemplate(){ SimpleClientHttpRequestFactory requestFactory = new SimpleClientHttpRequestFactory(); // 设置连接超时时间(单位:毫秒)