> 文章列表 > Spring MVC found on classpath, which is incompatible with Spring Cloud Gateway at this time.

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

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

目录

项目概述:

 问题解决:

步骤一:在关联的两个模块zx-gateway-0829和zx-common-0829中寻找 spring-boot-starter-web

 步骤二:删除gateway模块pom.xml中关联的commont模块,将common中gateway所需要的工具复制一份到gateway模块对应位置下。


前言

嗨喽,CSDN的友友们,今天启动网关Gateway时发现了一个不兼容的问题,记录一下猿征路上的小bug😜

报错:Spring MVC found on classpath, which is incompatible with Spring Cloud Gateway at this time. Please remove spring-boot-starter-web dependency.

翻译:在 classpath 上找到 Spring MVC,此时与 Spring Cloud Gateway 不兼容。请删除 spring-boot-starter-web 依赖项。


项目概述:

先来看看我的项目模块:

zx-gateway-0829模块中的pom.xml

 问题解决:

根据报错可以看出,我们的Gateway与MVC在classpath上出现了不兼容问题,发生了冲突。那么后面也提示了你解决方法,请删除 spring-boot-starter-web 依赖项

步骤一:在关联的两个模块zx-gateway-0829和zx-common-0829中寻找 spring-boot-starter-web

 步骤二:删除gateway模块pom.xml中关联的commont模块,将common中gateway所需要的工具复制一份到gateway模块对应位置下。

修改完成,重新启动即可。


写到最后

四季轮换,已经数不清凋零了多少, 愿我们往后能向心而行,一路招摇胜!

🐋 你的支持认可是我创作的动力

💟 创作不易,不妨点赞💚评论❤️收藏💙一下

😘 感谢大佬们的支持,欢迎各位前来不吝赐教