사용자 도구

사이트 도구


springframework:asyncresttemplate

차이

문서의 선택한 두 판 사이의 차이를 보여줍니다.

차이 보기로 링크

양쪽 이전 판 이전 판
다음 판
이전 판
springframework:asyncresttemplate [2019/01/14 12:48]
kwon37xi
springframework:asyncresttemplate [2019/01/14 12:56]
kwon37xi
줄 3: 줄 3:
   * Spring 5 부터는 이거보다는 [[springframework:webclient|WebClient]] 를 사용하는게 맞겠다.   * Spring 5 부터는 이거보다는 [[springframework:webclient|WebClient]] 를 사용하는게 맞겠다.
   * 비동기 [[springframework:resttemplate|Spring RestTemplate]]   * 비동기 [[springframework:resttemplate|Spring RestTemplate]]
-  * 주의기본 설정은 쓰레드 풀 기반 비동기임. + 
-  * Non Blocking IO 기반 비동기로 바꾸려면 HTTP Client Factory를 Netty로 지정해야함.+===== 주의 ===== 
 +  * 기본 설정은 쓰레드 풀 기반 비동기임. 
 +  * Non Blocking IO 기반 비동기로 바꾸려면 HTTP Client Factory를 Netty나, 기타 non blocking 으로 지정해야함. 
 + 
 +===== Non Blocking IO 설정 ===== 
 +  * [[https://hc.apache.org/httpcomponents-asyncclient-dev/|Apache HttpComponents – HttpComponents HttpAsyncClient Overview]] <code java> 
 +return new AsyncRestTemplate( 
 +                new HttpComponentsAsyncClientHttpRequestFactory()); 
 +</code> 
 +  * [[java:netty|Netty]]<code java> 
 +return new AsyncRestTemplate(new Netty4ClientHttpRequestFactory()); 
 +</code> 
 + 
 +===== 참고 ===== 
 +  * [[http://heowc.tistory.com/68|Spring Boot - Async 제대로 사용하기]]
  
springframework/asyncresttemplate.txt · 마지막으로 수정됨: 2019/01/14 12:56 저자 kwon37xi