【发布时间】:2022-06-10 20:20:29
【问题描述】:
我在我的基于 Spring Boot 微服务的项目中将 Spring Boot 1.3.7.RELEASE 升级到 2.5.12 和 Spring Framework 5.3.18,当我无法添加 zuul 依赖项时,我们已经成功升级了除网关服务之外的所有服务,因为它的维护模式是为什么我们实现了 Spring Cloud Gateway,然后我遇到了以下问题。
***************************
APPLICATION FAILED TO START
***************************
Description:
Spring MVC found on classpath, which is incompatible with Spring Cloud Gateway.
Action:
Please set spring.main.web-application-type=reactive or remove spring-boot-starter-web dependency.
为了最好的方式,我们需要做什么?
【问题讨论】:
-
网关不兼容spring MVC only webflux
-
@spencergibb 我们可以解决路由问题的任何替代解决方案。
-
@spencergibb 我们已经修复了使用 Spring Cloud Gateway 进行路由的问题。
标签: spring-boot hibernate spring-mvc microservices spring-cloud