> For the complete documentation index, see [llms.txt](https://jack80342.gitbook.io/spring-boot/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://jack80342.gitbook.io/spring-boot/iv.-spring-boot-features/27.-developing-web-applications/27.2-the-spring-webflux-framework/27.2.1-spring-webflux-auto-configuration.md).

# 27.2.1 Spring WebFlux自动配置

Spring Boot为Spring WebFlux提供了自动配置。这些配置在大多数应用里能够很好地工作。

自动配置会添加以下特性：

* 为`HttpMessageReader`和`HttpMessageWriter`实例配置编解码器([在此文档的后面章节](https://docs.spring.io/spring-boot/docs/2.0.0.RELEASE/reference/htmlsingle/#boot-features-webflux-httpcodecs)有描述)。
* 支持服务静态内容，包括对WebJars的支持 ([在此文档的后面章节](https://docs.spring.io/spring-boot/docs/2.0.0.RELEASE/reference/htmlsingle/#boot-features-spring-mvc-static-content)有描述)。

如果你想保持Spring Boot WebFlux特性，并添加额外的[WebFlux配置](https://docs.spring.io/spring/docs/5.0.4.RELEASE/spring-framework-reference/web.html#web-reactive)，你可以添加你自己的`WebFluxConfigurer`类型的`@Configuration`类，但是不加`@EnableWebFlux`。

如果你想完全控制Spring WebFlux，你可以添加你自己的`@Configuration`，并用`@EnableWebFlux`标注。
