문서의 선택한 두 판 사이의 차이를 보여줍니다.
다음 판 | 이전 판 | ||
springframework:asyncresttemplate [2019/01/14 12:48] kwon37xi 만듦 |
springframework:asyncresttemplate [2019/01/14 12:56] (현재) kwon37xi |
||
---|---|---|---|
줄 1: | 줄 1: | ||
====== AsyncRestTemplate ====== | ====== AsyncRestTemplate ====== | ||
* [[https:// | * [[https:// | ||
- | * 비동기 [[springframework: | ||
- | * 주의: 기본 설정은 쓰레드 풀 기반 비동기임. | ||
- | * Non Blocking IO 기반 비동기로 바꾸려면 HTTP Client Factory를 Netty로 지정해야함. | ||
* Spring 5 부터는 이거보다는 [[springframework: | * Spring 5 부터는 이거보다는 [[springframework: | ||
+ | * 비동기 [[springframework: | ||
+ | |||
+ | ===== 주의 ===== | ||
+ | * 기본 설정은 쓰레드 풀 기반 비동기임. | ||
+ | * Non Blocking IO 기반 비동기로 바꾸려면 HTTP Client Factory를 Netty나, 기타 non blocking 으로 지정해야함. | ||
+ | |||
+ | ===== Non Blocking IO 설정 ===== | ||
+ | * [[https:// | ||
+ | return new AsyncRestTemplate( | ||
+ | new HttpComponentsAsyncClientHttpRequestFactory()); | ||
+ | </ | ||
+ | * [[java: | ||
+ | return new AsyncRestTemplate(new Netty4ClientHttpRequestFactory()); | ||
+ | </ | ||
+ | |||
+ | ===== 참고 ===== | ||
+ | * [[http:// | ||