728x90
반응형

// Connection Timeout 10초, ReadTimeout 10초 설정.

private RestTemplate getRestTemplate() {
HttpComponentsClientHttpRequestFactory factory 

= new HttpComponentsClientHttpRequestFactory();
factory.setConnectTimeout(10*1000);
factory.setReadTimeout(10*1000);
RestTemplate restTemplate = new RestTemplate(factory);
return restTemplate;
}


728x90
반응형

'Web Programming > spring' 카테고리의 다른 글

Failed to determine a suitable driver class  (0) 2020.06.29
Spring RestTemplate Get 요청  (0) 2018.09.05
@ResponseBody @RestController  (0) 2018.09.04
No mapping found for HTTP request with URI  (0) 2018.09.04
BeanCreationException  (0) 2018.09.04

+ Recent posts