스프링으로 시작하는 리액티브 프로그래밍
-
12장 DebuggingSpring/Webflux 2023. 5. 21. 16:51
12.1.0 Reactor에서의 디버깅 방법 동기식, 명령형 프로그래밍에서는 Exception이 발생했을 때 Stacktrace 를 확인하거나 예외 발생이 예상되는 코드에 Breakpoint 를 걸어서 문제가 발생한 원인을 단계적으로 찾아가면 되기 때문에 상대적으로 디버깅이 쉽습니다. 반면에 Reactor 는 작업이 비동기적으로 실행되고, Reactor Sequence 는 선언형 프로그래밍 방식으로 구성되므로 디버깅이 쉽지 않습니다. 12.1.1 Debug Mode를 사용한 디버깅 Hooks.onOperatorDebug() 를 사용해서 Debug Mode 를 활성화 합니다. example 12_1 : 4th 데이터의 key grape 인데, MELONS 를 읽어서 오류가 발생하는 코드 public sta..
-
11장 ContextSpring/Webflux 2023. 5. 12. 20:59
1 Context란? * context [ˈkɑːˌtɛkst] 2. the situation in which something happens, the group of conditions that exist where and when something happens 2. 어떤 일이 발생하는 상황, 어떤 일이 발생하는 장소와 시간에 존재하는 조건의 집합 1. the words that are used with a certain word or phrase and that help to explain its meaning 1. 특정 단어 또는 구와 함께 사용되며 그 의미를 설명하는 데 도움이 되는 단어 예 : 아파서 병원 방문 시 의사에게 소개하는 전후 사정과 증상이 Context 에 해당합니다. → 어떠한 상..