admin管理员组

文章数量:1794759

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

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冲突了

解决方式

找到gateway下面的spring-boot-starter-web依赖,然后将其注释掉

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

 

本文标签: 错误classpathMVCspringGateway