사용자 도구

사이트 도구


springframework:webclient

차이

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

차이 보기로 링크

양쪽 이전 판 이전 판
다음 판
이전 판
springframework:webclient [2019/03/26 19:55]
kwon37xi
springframework:webclient [2022/11/18 15:16] (현재)
kwon37xi [timeouts]
줄 1: 줄 1:
 ====== WebClient ====== ====== WebClient ======
   * [[springframework:webflux|Spring WebFlux]] 와 함께 사용할 ''RequestTemplat'' 대체 라이브러리   * [[springframework:webflux|Spring WebFlux]] 와 함께 사용할 ''RequestTemplat'' 대체 라이브러리
 +  * see [[springframework:feign|Fegin]]
  
 ===== Connection Pool ===== ===== Connection Pool =====
줄 6: 줄 7:
   * [[https://github.com/reactor/reactor-netty/blob/master/src/main/java/reactor/netty/resources/ConnectionProvider.java|ConnectionProvider]]를 보면 ''ReactorNetty.POOL_MAX_CONNECTIONS - reactor.netty.pool.maxConnections'' 시스템 프라퍼티 값으로 설정하거나 혹은 자동 계산됨. (자동 계산을 믿는게 나을 듯)   * [[https://github.com/reactor/reactor-netty/blob/master/src/main/java/reactor/netty/resources/ConnectionProvider.java|ConnectionProvider]]를 보면 ''ReactorNetty.POOL_MAX_CONNECTIONS - reactor.netty.pool.maxConnections'' 시스템 프라퍼티 값으로 설정하거나 혹은 자동 계산됨. (자동 계산을 믿는게 나을 듯)
  
 +===== timeouts =====
 +  * [[https://howtodoinjava.com/spring-webflux/webclient-set-timeouts/|Spring WebClient - How to set timeouts - HowToDoInJava]]
 +  * [[https://akageun.github.io/2019/06/23/spring-webflux-tip-2.html|[Webflux Tip] 2. WebClient 설정(connection pool, timeout) · 오늘도 개발자]]
 +  * [[https://medium.com/@kalpads/configuring-timeouts-in-spring-reactive-webclient-4bc5faf56411|Configuring timeouts in Spring reactive WebClient | by Kalpa Senanayake | Medium]]
 +
 +===== uri 생성시 주의점 =====
 +  * ''UriBuilder''를 사용해야하면, 전체를 ''webClient.get().uri("/...?param1=value1&param2=value2...")'' 형태로 할경우 [[springframework:springboot:micrometer|SpringBoot Micrometer]] 태그 과다 생성으로 문제가 발생한다.
 +  * uri 함수중에서 uriTemplate 를 파라미터로 받는 uri 함수를 사용해야 정상적으로 메트릭 태그가 path 로 등록됨.
 +  * ''UriBuilder.path()'' 를 사용하면 안됨.
 ===== 참조 ===== ===== 참조 =====
   * [[https://www.baeldung.com/spring-5-webclient|Spring 5 WebClient | Baeldung]]   * [[https://www.baeldung.com/spring-5-webclient|Spring 5 WebClient | Baeldung]]
   * [[https://www.e4developer.com/2018/05/31/webflux-in-practice-asynchronous-service-with-webclient/|WebFlux in practice – asynchronous service with WebClient | E4developer]]   * [[https://www.e4developer.com/2018/05/31/webflux-in-practice-asynchronous-service-with-webclient/|WebFlux in practice – asynchronous service with WebClient | E4developer]]
   * [[https://www.callicoder.com/spring-5-reactive-webclient-webtestclient-examples/|Spring 5 WebClient and WebTestClient Tutorial with Examples | CalliCoder]]   * [[https://www.callicoder.com/spring-5-reactive-webclient-webtestclient-examples/|Spring 5 WebClient and WebTestClient Tutorial with Examples | CalliCoder]]
 +  * [[https://www.baeldung.com/spring-log-webclient-calls|Logging Spring WebClient Calls | Baeldung]]
 +  * [[https://dzone.com/articles/unit-tests-for-springs-webclient|Unit Tests for Spring's WebClient - DZone Java]]
 +  * [[https://dzone.com/articles/resttemplate-vs-webclient|RestTemplate vs. WebClient - DZone Java]]
 +  * [[https://www.baeldung.com/spring-webclient-resttemplate|Spring WebClient vs. RestTemplate | Baeldung]]
springframework/webclient.1553597720.txt.gz · 마지막으로 수정됨: 2019/03/26 19:55 저자 kwon37xi