springboot与dubbo版本匹配问题
官方链接
参考:
项目里原始版本:
- springboot:2.1.6.RELEASE
- dubbo-spring-boot-starter : 0.2.1.RELEASE
- dubbo: 2.6.5
上面这么写是可以正常运行的。但是当把dubbo升级到2.6.7时候,却报错了,异常如下:
升级到2.6.7后错误日志:
Description:
The bean 'dubboConfigConfiguration.Single', defined in null, could not be registered. A bean with that name has already been defined in null and overriding is disabled.
Action:
Consider renaming one of the beans or enabling overriding by setting spring.main.allow-bean-definition-overriding=true
- 后来经过尝试,把springboot的版本下调到2.0.9时候,项目可以正常启动。
所以得到下面这个版本匹配的结论: - 2.7版本以下的,使用的是alibaba目录下的jar,
springboot | dubbo-spring | dubbo | 注 |
---|---|---|---|
1.x | 0.1.2.RELEASE | 2.6.5+ | 2.6.6以上的dubbo需要配置netty-alljar包 |
2.0.0~2.0.9 | 0.2.1.RELEASE | 2.6.5/2.6.6/2.6.7 | |
2.1.x | 0.2.1.RELEASE | 2.6.5 /2.7.1 |
- 2.7版本以上的,用apache目录下面的jar,dubbo-spring和dubbo都使用apache下面的版本,统一使用2.7即可,springboot也可以用2.1.x以上
还没有评论,来说两句吧...