宋子宪博客

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

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

解决方法:
产生问题原因:Gateway 不支持spring boot web
找到pom文件,把spring-boot-starter-web删除即可
删除以下两个依赖

<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-web</artifactId>
</dependency>

<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-actuator</artifactId>
</dependency>

然后刷新maven,再次启动就不报错了

当前页面是本站的「Google AMP」版。查看和发表评论请点击:完整版 »