是否可以使用仅添加了spring-boot-starter-webflux的现有spring-boot-starter-web编码方案??没有spring-boot-starter-web的话。
发布于 2019-01-08 16:13:52
spring-boot-starter-webflux为Spring WebFlux应用程序提供了相关的依赖关系,从Jackson到用于注释和函数式编程模型的spring-webflux模块。
spring-boot-starter-web对Spring MVC做了同样的事情。
在类路径中同时拥有这两个类路径意味着您需要一个Spring MVC应用程序,并且仍然在该应用程序中使用Spring WebFlux提供的新WebClient。
正如在the Spring Boot reference documentation中提到的,如果您想要创建一个Spring WebFlux应用程序,那么您应该添加spring-boot-starter-webflux,并且避免添加spring-boot-starter-web。
https://stackoverflow.com/questions/54077167
复制相似问题