记录关于springCloud 网关从zuul升级到gateway所遇到的问题

 服务最开始引入的主要依赖版本如下:

        org.springframework.boot

        spring-boot-starter-parent

        2.1.1.RELEASE

       

        UTF-8         UTF-8         1.8

        Finchley.SR1

但是当服务启动时,一直抛出如下异常:

Parameter 0 of method websocketRoutingFilter in org.springframework.cloud.gateway.config.GatewayAutoConfiguration required a bean of type 'org.springframework.web.reactive.socket.client.WebSocketClient' that could not be found.The following candidates were found but could not be injected: - Bean method 'reactorNettyWebSocketClient' in 'GatewayAutoConfiguration.NettyConfiguration' not loaded because @ConditionalOnClass did not find required class 'reactor.ipc.netty.http.client.HttpClient'

花费大量时间排查原因,最终找到问题是因为springcloud的Finchley版本与springboot 2.1.0不兼容。要么降级到引导2.0.6,要么使用Greenwich.M3,最终采用Greenwich.M3,

启动正常!!!

来源:https://github.com/spring-cloud/spring-cloud-gateway/issues/319

你可能感兴趣的:(记录关于springCloud 网关从zuul升级到gateway所遇到的问题)