# 11.6 总结

* Spring WebFlux 提供了一个响应式 web 框架，其编程模型类似 Spring MVC，甚至共享许多相同的注解。
* Spring 5 还提供了一个函数式编程模型作为 Spring WebFlux 的替代方案。
* 响应式控制器可使用 WebTestClient 进行测试。
* 在客户端，Spring 5 提供了 WebClient，它是响应式的，对 RestTemplate 的模拟。
* 为了保护web应用程序的安全，尽管 WebFlux 对底层机制有一些重要影响，Spring Security 5 支持响应式编程的安全配置。且与非反应模式的 Spring MVC 应用程序安全配置没有显著的区别。


---

# 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/11.6-zong-jie.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.
