일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | 6 | 7 |
8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 | 16 | 17 | 18 | 19 | 20 | 21 |
22 | 23 | 24 | 25 | 26 | 27 | 28 |
29 | 30 |
- 배열
- @RequiredArgsConstructor
- 계산 검색 방식
- @ComponentScan
- 선형 리스트
- 쿠키
- 인터페이스
- 쿼리메소드
- query
- 내부 정렬
- 스택 큐 차이
- WebClient
- 연결 리스트
- 클린
- 마크다운
- code
- @NoArgsConstructor
- 코드
- CleanCode
- 트리
- JsonNode
- 클래스
- 마크다운 테이블
- 정렬
- 빅 오 표기법
- 자료구조
- java
- mysql
- 클린코드
- 리스트
- Today
- Total
목록Spring/WebClient (3)
Developer Cafe
mono는 0~1개의 결과를 처리할때 쓰는거고 flux는 0~여러개를 처리할때 쓰는것이다. 그래서 보통 mono와는 .collectList()와 차이가 난다. @Override public List carsInfo(ShowCarsDto showCarsDto) { return WebClient.create("https://erp.dev.zzimcar.co.kr") .post() .uri("/search/v2/car/list") .bodyValue(showCarsDto) .retrieve() .bodyToFlux(ShowCarsResDto.class) .collectList() .block(); }
Mono ss = WebClient.create("https://api.dev.zzimcar.co.kr") .post() .uri("/review/") .bodyValue(wr) .retrieve() .bodyToMono(WriteReviewResDto.class); // block()이 없음 WriteReviewResDto ss = WebClient.create("https://api.dev.zzimcar.co.kr") .post() .uri("/review/") .bodyValue(wr) .retrieve() .bodyToMono(WriteReviewResDto.class) .block();// block()이 있음 return WebClient.create("https://api.dev.zzimca..

www.baeldung.com/webflux-webclient-parameters WebClient Requests with Parameters | Baeldung Learn how to reactively consume REST API endpoints with WebClient from Spring Webflux. www.baeldung.com 1. 간단하게 String으로 출력해보기 String result = WebClient.create("https://api.dev.zzimcar.co.kr") .get() .uri("/review/list?getCnt=10&sp=0") .retrieve() .bodyToMono(String.class) .block(); System.out.println(res..