Reactive响应式编程Spring webFlux

作者: jekkay 分类: java,默认 发布时间: 2019-04-22 11:25


1. 概念


  • Reactive编程是一种通过将智能路由和事件消费组合起来改变行为的微架构风格
  • Reactive响应式(反应式)编程 是一种新的编程风格,其特点是异步或并发、事件驱动、推送PUSH机制以及观察者模式的衍生。
  • Reactive 是异步非阻塞编程;Reactive 能够提升程序性能;Reactive 解决传统编程模型遇到的困境
  • Reactive programming is a declarative programming paradigm concerned with data streams and the propagation of change. With this paradigm it is possible to express static (e.g. arrays) or dynamic (e.g. event emitters) data streams with ease, and also communicate that an inferred dependency within the associated execution model exists, which facilitates the automatic propagation of the changed data flow.


2. 几篇介绍文字

3. Spring中的Reactive技术栈

  • [] (

Spring Boot 2.0提供了Reactive Statck的编程Spring WebFlux。以下摘自官网描述:

evelopers are constantly challenged with choosing the most effective runtime, programming model, and architecture for their application’s requirements and team’s skill set. For example, some use cases are best handled by a technology stack based on synchronous blocking I/O architecture, whereas others would be better served by an asynchronous, nonblocking stack built on the reactive design principles described in the Reactive Streams Specification.

Reactive Spring represents a platform-wide initiative to deliver reactive support at every level of the development stack: web, security, data, messaging, etc. Spring Framework 5 delivers on this vision by providing a new reactive web stack called Spring WebFlux, which is offered side by side with the traditional Spring MVC web stack.