2026/08/19 3

[Spring WebClient] 1. Request / Response

0. WebClient란?WebFlux에서 사용하는 Non-Blocking Http Client✅ Reactor 기반 동작✅ Mono / Flux 형태로 응답 처리✅ Streaming 지원➡️ Thread나 동시성 처리를 직접 관리 안함➡️ Server측과 동일한 Codec 체계를 사용하여 Request/Response를 Encode/Decode 가능 1. retrieve()응답을 추출할 때 사용 예시) 전체 ResponseEntity 받기더보기WebClient client = WebClient.create("https://example.org");Mono> result = client.get() .uri("/persons/{id}", id) .accept(MediaType..

Spring 2026.08.19

[Spring WebFlux] 3. DispatcherHandler

0. DispatcherHandler란?WebFlux 요청 처리의 중심✅ FrontController 역할을 담당함 (DispatcherServlet와 비슷)✅ 'webHandler'란 이름으로 빈 등록되며, WebHttpHandlerBuilder가 주변 구성요소들을 모아 WebFlux 처리 Chain에 넣어줌✅ 다양한 Delegate Component를 활용하여 적절한 Handler를 호출함 1. Special Bean TypesDispatcherHandler는 요청을 직접 전부 처리하지 않고, Spring Bean들에게 작업을 위임함Bean Type역할대표 구현체HandlerMappingRequest를 처리할 Handler를 찾음(가장 먼저 매칭된 Handler가 선택됨)- RequestMapping..

Spring 2026.08.19

[Spring WebFlux] 2. Reactive Core

spring-web 기반 구조✅ reactive web application을 위한 저수준 기반 기능을 제공함✅ 서버: HTTP Server → HttpHandler → WebHandler API → Controller / Functional Endpoint✅ 클라이언트: HTTP Client → ClientHttpConnector → WebClient 1. HttpHandler서로 다른 HTTP Server를 WebFlux의 공통 Reactive 처리 구조에 연결하는 최소 추상화✅ HTTP Request를 받아 Response를 Non-Blocking으로 처리하고, 처리 완료 여부를 Mono로 반환✅ Netty, Tomcat, Jetty 처럼 서로 다른 서버 API를 Webflux가 동일한 방식으로 사..

Spring 2026.08.19