【spring-cloud-getway】NoSuchMethodError: reactor.netty.http.client.HttpClient.chunkedTransfer 野性酷女 2024-03-27 16:18 52阅读 0赞 今天集成spring-cloud-getway时,启动成功,但是访问时候报NoSuchMethodError错误: 2023-02-12 23:17:00.712 ERROR 21048 --- [ctor-http-nio-4] reactor.netty.http.server.HttpServer : [id: 0x9569f947, L:/0:0:0:0:0:0:0:1:10002 - R:/0:0:0:0:0:0:0:1:53261] java.lang.NoSuchMethodError: reactor.netty.http.client.HttpClient.chunkedTransfer(Z)Lreactor/netty/http/client/HttpClient; at org.springframework.cloud.gateway.filter.NettyRoutingFilter.filter(NettyRoutingFilter.java:107) ~[spring-cloud-gateway-core-2.1.0.RELEASE.jar:2.1.0.RELEASE] at org.springframework.cloud.gateway.handler.FilteringWebHandler$GatewayFilterAdapter.filter(FilteringWebHandler.java:135) ~[spring-cloud-gateway-core-2.1.0.RELEASE.jar:2.1.0.RELEASE] at org.springframework.cloud.gateway.filter.OrderedGatewayFilter.filter(OrderedGatewayFilter.java:44) ~[spring-cloud-gateway-core-2.1.0.RELEASE.jar:2.1.0.RELEASE] at org.springframework.cloud.gateway.handler.FilteringWebHandler$DefaultGatewayFilterChain.lambda$filter$0(FilteringWebHandler.java:117) ~[spring-cloud-gateway-core-2.1.0.RELEASE.jar:2.1.0.RELEASE] 根据网上的经验,统一getway和spring-boot的版本,由于spring-boot的版本是2.2.6,所以将cloud-getway的版本也修改为2.2.6之后测试还是报一样的错误。 最后将二者的版本都修改为2.1.3.RELEASE访问成功。 spring-boot依赖: <parent> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-parent</artifactId> <version>2.1.3.RELEASE</version> </parent> cloud-getway依赖: <dependency> <groupId>org.springframework.cloud</groupId> <artifactId>spring-cloud-starter-gateway</artifactId> <version>2.1.3.RELEASE</version>--> </dependency>
还没有评论,来说两句吧...