程序员

springcloud Hoxton.SR11集成gateway网关 坑!!!

作者:admin 2021-06-12 我要评论

一看就会的超详细教程:SpringBoot整合MybatisPlus! 这里根据官网新推出的springcloud Hoxton.SR11版本去集成gateway的一个坑 首先先写版本号: 框架 版本号 sp...

在说正事之前,我要推荐一个福利:你还在原价购买阿里云、腾讯云、华为云服务器吗?那太亏啦!来这里,新购、升级、续费都打折,能够为您省60%的钱呢!2核4G企业级云服务器低至69元/年,点击进去看看吧>>>)

一看就会的超详细教程:SpringBoot整合MybatisPlus!>>>

这里根据官网新推出的springcloud Hoxton.SR11版本去集成gateway的一个坑

首先先写版本号:

框架

版本号

springcloud

Hoxton.SR11

springboot

2.3.0

根据官网推荐,springcloud这个版本支持的springboot是2.3.0。

在集成gateway网关时会报错如下:

***************************
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.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:/repo/io/projectreactor/netty/reactor-netty/0.9.7.RELEASE/reactor-netty-0.9.7.RELEASE.jar!/reactor/netty/resources/ConnectionProvider$Builder.class

It was loaded from the following location:

    file:/D:/repo/io/projectreactor/netty/reactor-netty/0.9.7.RELEASE/reactor-netty-0.9.7.RELEASE.jar


Action:

Correct the classpath of your application so that it contains a single, compatible version of reactor.netty.resources.ConnectionProvider$Builder

从报错信息中可以看到,我们报错因为以来冲突。所以将reactor-netty的包版本降低,故pom中添加如下依赖。

        <dependency>
            <groupId>io.projectreactor.netty</groupId>
            <artifactId>reactor-netty</artifactId>
            <version>0.9.4.RELEASE</version>
        </dependency>

版权声明:本文转载自网络,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。本站转载出于传播更多优秀技术知识之目的,如有侵权请联系QQ/微信:153890879删除

相关文章
  • Windows 10新增磁盘分析工具:文件夹占

    Windows 10新增磁盘分析工具:文件夹占

  • 鸿蒙HarmonyOS环境搭建遇到的坑,分享

    鸿蒙HarmonyOS环境搭建遇到的坑,分享

  • Zabbix5.2由浅入深系列之制作网络设备

    Zabbix5.2由浅入深系列之制作网络设备

  • 转手赚1000,开源抢茅台神器,真香!

    转手赚1000,开源抢茅台神器,真香!

腾讯云代理商
精彩导读
海外云服务器
热门资讯
腾讯云代理商