【发布时间】:2018-10-31 06:31:16
【问题描述】:
我从 Spring Boot 文档中得到以下说明:
在应用程序中同时添加 spring-boot-starter-web 和 spring-boot-starter-webflux 模块会导致 Spring Boot 自动配置 Spring MVC,而不是 WebFlux。之所以选择这种行为,是因为许多 Spring 开发人员将 spring-boot-starter-webflux 添加到他们的 Spring MVC 应用程序以使用响应式 WebClient。您仍然可以通过将所选应用程序类型设置为 SpringApplication.setWebApplicationType(WebApplicationType.REACTIVE) 来强制执行您的选择
我的问题是:
如果我的应用程序同时包含 MVC 服务和 webflux 服务怎么办? 是否支持?
例如:
我可能有一些基于 MVC 的现有管理服务。现在我想添加一些带有 webflux 风格的新服务。
【问题讨论】:
标签: spring-boot spring-webflux