近期在学习微服务的时候遇到这样一个报错
Spring MVC found on classpath, which is incompatible with Spring Cloud Gateway at this time. Please remove spring-boot-starter-web dependency.
后面查找资料发现这是spring cloud 和gateway 发生了冲突,因为gateway已经有了spring mvc的功能
解决方法是将pom里spring-web的包隐藏掉。
使用gate-starter的包