Reactive in Spring MVC

Even though Spring MVC is inherently blocking, some aspects can be made reactive by using reactive programming capabilities available as part of Spring 5.

In a Spring MVC controller, you can employ reactive types, Flux and Mono, as shown in the following diagram. The only rule is that you can use these reactive types only as the controller's return values:

Figure 5: Spring MVC becoming non-blocking with usage of reactive types

Spring MVC annotations such as @Controller, @RequestMapping, and so on are also supported in Spring WebFlux. So converting a Spring MVC web application to Spring WebFlux can be done over a period of time in a slow-paced manner.

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

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