将gateway项目中pom文件总的中的“spring-boot-starter-webflux” 依赖去掉可以编译成功,
加上spring-boot-starter-webflux又报冲突,问了很多高手,都没办法解决
你看下具体是哪里冲突了,pom里面排除掉
1.规范springboot版本
2.规范springcloud版本
3.官网查找springboot,springcloud版本兼容
4.gateway自带webflux版本与手动引入的webflux依赖版本冲突
这是pom文件依赖 <dependencies> <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> <dependency> <groupId>org.springframework.cloud</groupId> <artifactId>spring-cloud-starter-netflix-eureka-server</artifactId> </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-test</artifactId> <scope>test</scope> </dependency> </dependencies>
这个是报错信息
1.能给看看版本版本版本版本版本版本,或许你需要知道dependencyManagement标签,或许你需要去看官网推荐的版本兼容https://spring.io/projects/spring-cloud,或许你可以看看spring cloud alibaba版本推荐《https://github.com/alibaba/spring-cloud-alibaba/wiki/版本说明》
2.gateway自身已经引入webflux依赖,干嘛非要再手动引入webflux依赖
3.或许你需要一个IDEA插件maven helper,清晰的查看依赖、冲突