bboks.net™

Spring RestTemplate timeout 지정 본문

Java

Spring RestTemplate timeout 지정

bboks.net 2015. 1. 15. 16:51
자바 코드기반 구성
HttpComponentsClientHttpRequestFactory factory = new HttpComponentsClientHttpRequestFactory();
factory.setReadTimeout(2000); //milliseconds
factory.setConnectionTimeout(2000); // milliseconds
RestTemplate restTemplate = new RestTemplate(factory);

XML 기반 구성


     
         
     



[출처] How to Set HTTP Request Timeouts With Spring RestTemplate

0 Comments
댓글쓰기 폼