Skip to Content
처음부터 제대로 배우는 스프링 부트
book

처음부터 제대로 배우는 스프링 부트

by 마크 헤클러, 오시영, 서정대
May 2023
Beginner to intermediate
384 pages
8h 42m
Korean
Hanbit Media, Inc.
Content preview from 처음부터 제대로 배우는 스프링 부트
345
12
리액티브로 더 깊이 들어가기
내의 위치 도큐먼트를 검색하면 일치 항목이 하나만 반환되는 반면, 항공기 등록번호로 검색하
면 여러 결과가 나올 수 있다는 사실을 고려해 반환 타입을
Publisher
로 정했습니다.
Mono
Flux
는 둘 다
Publisher
의 구현체이기 때문에 반환 타입을
Publisher
로 지정하면,
Mono
Flux
두 타입을 모두 반환할 수 있습니다.
마지막으로, 사용자가 검색 매개변수를 제공하지 않으면,
Mono.empty()
를 사용해 비어 있는
Mono
를 반환합니다. 요구사항이 동일한 결과를 요구하거나 모든 항공기 위치와 같은 다른 결과
를 반환하도록 선택(또는 요구)할 수 있습니다. 어떤 설계 결정을 내리든 ‘놀람 최소화 원칙
Principle
of
Least
Astonishment
’을 기준으로 삼으면 됩니다.
PositionController
클래스의 최종 (현재) 버전입니다.
import org.reactivestreams.Publisher;
import org.springframework.http.MediaType;
import org.springframework.messaging.rsocket.RSocketRequester;
import org.springframework.stereotype.Controller; ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

프로그래머의 길 멘토에게 묻다

프로그래머의 길 멘토에게 묻다

David Hoover, Adewale Oshineye, Kang Jung Bin
SRE를 위한 시스템 설계와 구축

SRE를 위한 시스템 설계와 구축

헤더 애드킨스, 벳시 바이어, 폴 블랭킨십, 피오트르 레반도프스키, 애나 오프레아, 애덤 스터블필드

Publisher Resources

ISBN: 9791169210966