Spring MVC found on classpath, which is incompatible with Spring Cloud Gateway.

经过网上和官网查找原因是因为 spring cloud gateway 是建立在 spring boot 2.x 和 spring webflux 基础上,gateway 本身已经包含了spring mvc 的功能,正与提示的一样和 spring boot 的 web starter 冲突了。

No primary or default constructor found for interface javax.servlet.http.HttpServletRequest

项目的controller接口还是引入 javax.servlet.http.HttpServletRequest 这是报错的原因所在。修改为:org.springframework.http.server.reactive.ServerHttpRequest 所属spring-web-5.2.2RELEASE.jar。