How it works...

This is the first time that the Spring Reactive module has been introduced in a recipe. Although Flux<T> and Mono<T> stream data can be recognized implicitly using the Reactor Core 3.0 APIs, there are several reactive components that Spring 5 can offer which are found in this module. From Spring 5 technical documentation, this module provide supports for FreeMarker templating through its two APIs needed for reactive content parsing: org.springframework.web.reactive.result.view.freemarker.FreeMarkerConfigurer and org.springframework.web.reactive.result.view.freemarker.FreeMarkerViewResolver. Although these reactive APIs can only be used in Functional and Reactive Web Framework in Chapter 9, Spring Boot 2.0, this recipe still experimented with using the non-reactive version of these two APIs to render Reactive stream data. The recipe was successful, but FreeMarker has no parsing API or wrapper that will convert Publisher<T> stream to raw data for publishing. Mono<T> streams must execute the blocking operation block() in order to extract the raw data while Flux<T> needs to call collectList().block() in order to expose the Collection<T> data for page rendering.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.227.190.211