# 第 11 章 开发响应式 API

本章介绍

* 使用 Spring WebFlux
* 编写和测试响应式控制器和客户端
* 消费 REST API
* 保护响应式 web 应用程序安全

既然你已经对响应式编程和 Project Reactor 有了很好的了解，就可以开始在 Spring 应用程序中应用这些技术了。在本章中，我们将重温你在第 6 章中编写的一些控制器，以利用 Spring5 的响应式编程模型。

更具体地说，我们将看看 Spring5 的新的响应式 web 框架 Spring WebFlux。你将很快发现 Spring WebFlux 与 Spring MVC 非常相似，同时你已经知道的在 Spring 中构建 REST API的知识，这些条件下，它的应用很容易。


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://potoyang.gitbook.io/spring-in-action-v5/di-11-zhang-kai-fa-xiang-ying-shi-api.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
