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

  • 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.

主站蜘蛛池模板: 西安市| 南丰县| 平湖市| 阳谷县| 手游| 仙桃市| 县级市| 武陟县| 灵山县| 于田县| 虹口区| 平山县| 清徐县| 吉木乃县| 巴彦淖尔市| 景德镇市| 临邑县| 临江市| 肃宁县| 清水河县| 孝义市| 兰坪| 中西区| 会宁县| 惠东县| 靖江市| 北辰区| 桂阳县| 辛集市| 镇江市| 日喀则市| 衡山县| 抚顺市| 固原市| 玉环县| 延安市| 池州市| 盐池县| 浦东新区| 蒙山县| 都江堰市|