The attempt was made from the following location 的bug问题
***************************
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.reactorNettyWebSocketClient(GatewayAutoConfiguration.java:738)
The following method did not exist:
org.springframework.web.reactive.socket.client.ReactorNettyWebSocketClient.setHandlePing(Z)V
The method's class, org.springframework.web.reactive.socket.client.ReactorNettyWebSocketClient, is available from the following locations:
jar:file:/D:/maven/repository/org/springframework/spring-webflux/5.2.3.RELEASE/spring-webflux-5.2.3.RELEASE.jar!/org/springframework/web/reactive/socket/client/ReactorNettyWebSocketClient.class
It was loaded from the following location:
file:/D:/maven/repository/org/springframework/spring-webflux/5.2.3.RELEASE/spring-webflux-5.2.3.RELEASE.jar
Action:
Correct the classpath of your application so that it contains a single, compatible version of org.springframework.web.reactive.socket.client.ReactorNettyWebSocketClient
Disconnected from the target VM, address: '127.0.0.1:11801', transport: 'socket'
Process finished with exit code 1
先开始以为是maven包冲突了,故修改pom文件如下:

改完确实可以启动了,然后发现gateway路由的配置失效了,看控制台有这样一条消息:
Spring Webflux is missing from the classpath, which is required for Spring Cloud Gateway at this time. Please add spring-boot-starter-webflux dependency.
排除后,这个包没有了
最后发现是springboot与springcloud的版本不匹配问题,去查了官网发现匹配的springboot版本为2.2.5

修改springboot版本后,问题解决
还遇到了一个配置文件失效的问题,解决方案:

手动配置
浙公网安备 33010602011771号