admin管理员组文章数量:1566678
今天写springcloud项目的时候碰到一个很坑的报错:
Correct the classpath of your application so that it contains a single, compatible version of reactorty.resources.ConnectionProvider
大致意思就是jar包各种依赖关系不兼容,完整报错如下
Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
2022-04-02 14:18:39.523 ERROR 94512 --- [ main] o.s.b.d.LoggingFailureAnalysisReporter :
***************************
APPLICATION FAILED TO START
***************************
Description:
An attempt was made to call a method that does not exist. The attempt was made from the following location:
org.springframework.cloud.gateway.config.GatewayAutoConfiguration$NettyConfiguration.gatewayHttpClient(GatewayAutoConfiguration.java:622)
The following method did not exist:
reactor.netty.resources.ConnectionProvider.elastic(Ljava/lang/String;Ljava/time/Duration;Ljava/time/Duration;)Lreactor/netty/resources/ConnectionProvider;
The method's class, reactor.netty.resources.ConnectionProvider, is available from the following locations:
jar:file:/D:/Program%20Files/repository/io/projectreactor/netty/reactor-netty/0.9.2.RELEASE/reactor-netty-0.9.2.RELEASE.jar!/reactor/netty/resources/ConnectionProvider.class
It was loaded from the following location:
file:/D:/Program%20Files/repository/io/projectreactor/netty/reactor-netty/0.9.2.RELEASE/reactor-netty-0.9.2.RELEASE.jar
Action:
Correct the classpath of your application so that it contains a single, compatible version of reactor.netty.resources.ConnectionProvider
Process finished with exit code 1
pom文档导入的依赖如下:
springboot版本是2.2.2.release,springcloud版本是Hoxton.SR8,两个版本不兼容
最后把springboot和springcloud版本调整成互相兼容的版本,再启动项目就不报错了
本文标签: 冲突classpathCorrectjarcompatible
版权声明:本文标题:jar包冲突:Correct the classpath of your application so that it contains a single, compatible version of 内容由热心网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:https://www.elefans.com/xitong/1726220458a1061045.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论