Gateway启动不起来
来源:2-3 搭建路由模块-gateway

guo_x
2020-04-21
老师,都是跟着视频走的,但是为什么就是Gateway启动不起来,一直报错:
Error starting ApplicationContext. To display the conditions report re-run your application with ‘debug’ enabled.
01.244 ERROR o.s.b.d.LoggingFailureAnalysisReporter:40
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:612)
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:/E:/App/ideaMaven/MavenRepository/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:/E:/App/ideaMaven/MavenRepository/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
1回答
-
甲蛙
2020-04-21
将Spring Boot版本改成2.2.2.RELEASE,将Spring Cloud版本改成Hoxton.RELEASE,和课程保持一致。等熟悉Spring Cloud了后,再使用最新版本。
修改根目录下的父pom.xml
<parent> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-parent</artifactId> <version>2.2.2.RELEASE</version> <relativePath/> <!-- lookup parent from repository --> </parent> ... <properties> <java.version>1.8</java.version> <spring-cloud.version>Hoxton.RELEASE</spring-cloud.version> </properties>
10
相似问题