我的项目版本为以下:
错误信息为以下:
在学习gateway技术的时候报错,原因是因为 Spring Cloud Gateway 的项目中不能使用 Spring MVC 的依赖,而我不小心通过依赖其它模块而间接引用了该 Spring MVC 的依赖。
也就是说,在 Spring Cloud Gateway 的项目中不能使用如下依赖
<!--网关gateway依赖-->
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-gateway</artifactId>
<exclusions>
<exclusion>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</exclusion>
</exclusions>
</dependency>
很好,又解决一个问题~