官术网_书友最值得收藏!

  • Spring 5.0 Projects
  • Nilang Patel
  • 192字
  • 2021-07-02 12:35:07

Reactive span across Spring modules

By introducing a reactive web framework, WebFlux , Spring also made necessary changes in other modules to provide first-class support for WebFlux. Spring Boot, Spring Security, Thymeleaf, and Spring Data are among the few modules that are equipped with WebFlux capabilities. This can be described with the following diagram:

Spring Data has adopted a reactive paradigm and started supporting infinite streams from the database with the @Tailableannotation. Spring Data JPA is mostly associated with RDBMS, which is blocking in nature so it cannot support Reactive Programming.

Spring MVC is inherently blocking in nature; however, we can use Reactive Programming for some of the parts, which can be converted to be reactive. For example, the Spring MVC controller can be equipped with the Flux and Mono types to handle the data stream in a reactive way.

Apart from this, a few annotations like @Controller, @RequestMapping, and so on are supported in WebFlux so you can convert a Spring MVC application to WebFlux in an incremental manner. We will see more details about reactive support in Spring Framework through WebFlux by creating a sample application.

主站蜘蛛池模板: 米脂县| 宜兰县| 牡丹江市| 黄陵县| 霍城县| 鄯善县| 定西市| 锦屏县| 井冈山市| 新蔡县| 繁昌县| 保定市| 大姚县| 筠连县| 合山市| 上犹县| 宁蒗| 诸城市| 施甸县| 深圳市| 台东县| 仙游县| 思茅市| 灵武市| 平顺县| 奉新县| 吉首市| 含山县| 商南县| 乌鲁木齐县| 内乡县| 商丘市| 上高县| 神农架林区| 堆龙德庆县| 库尔勒市| 建平县| 浮梁县| 喀喇沁旗| 扎赉特旗| 景宁|