在搭建gateway服務(wù)的時(shí)候,啟動(dòng)出現(xiàn)以下問題:
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.buildConnectionProvider(GatewayAutoConfiguration.java:798)
The following method did not exist:
? ? reactor.netty.resources.ConnectionProvider$Builder.evictInBackground(Ljava/time/Duration;)Lreactor/netty/resources/ConnectionProvider$ConnectionPoolSpec;
The method's class, reactor.netty.resources.ConnectionProvider$Builder, is available from the following locations:
? ? jar:file:/D:/apache-maven-3.3.9/repository/io/projectreactor/netty/reactor-netty/0.9.12.RELEASE/reactor-netty-0.9.12.RELEASE.jar!/reactor/netty/resources/ConnectionProvider$Builder.class
The class hierarchy was loaded from the following locations:
? ? reactor.netty.resources.ConnectionProvider.Builder: file:/D:/apache-maven-3.3.9/repository/io/projectreactor/netty/reactor-netty/0.9.12.RELEASE/reactor-netty-0.9.12.RELEASE.jar
? ? reactor.netty.resources.ConnectionProvider.ConnectionPoolSpec: file:/D:/apache-maven-3.3.9/repository/io/projectreactor/netty/reactor-netty/0.9.12.RELEASE/reactor-netty-0.9.12.RELEASE.jar
Action:Correct the classpath of your application so that it contains a single, compatible version of reactor.netty.resources.ConnectionProvider$Builder
?這個(gè)看就是依賴導(dǎo)致的,應(yīng)該是springBoot的和spring cloud版本不符導(dǎo)致的。我現(xiàn)在錯(cuò)誤的版本是:Spring-boot是2.3.0.RELEASE,Spring-cloud是Hoxton.SR12這是不符合的。文章來源:http://www.zghlxwxcb.cn/news/detail-597440.html
改成:Spring-boot是2.3.0.RELEASE,Spring-cloud是Hoxton.SR8 或者?Spring-boot是2.3.12.RELEASE,Spring-cloud是Hoxton.SR12就可以了文章來源地址http://www.zghlxwxcb.cn/news/detail-597440.html
到了這里,關(guān)于spring-cloud-gateway版本和springboot版本不匹配的文章就介紹完了。如果您還想了解更多內(nèi)容,請(qǐng)?jiān)谟疑辖撬阉鱐OY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!