admin管理员组文章数量:1794759
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. 说我依赖重复了,重复就重复了呗,为啥还报错还就搞不明白了
<dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-web</artifactId> </dependency>原来是springcloudgateway的内部是通过netty+webflux实现的,webflux实现和springmvc配置依赖冲突。
将上面依赖改为以下
<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> <exclusion> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-webflux</artifactId> </exclusion> </exclusions> </dependency>============================================================================================
加一句,这个springcloud中的gateway越来越玄,我启动几次不行,把我配置重新删除,重新手打就行了,而且和前面代码都是一模一样,maven依赖也重新加载过,可怕
本文标签: classpathMVCspringincompatibleTime
版权声明:本文标题:Spring MVC found on classpath, which is incompatible with Spring Cloud Gateway at this time. 内容由林淑君副主任自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.xiehuijuan.com/baike/1686618782a86939.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论