官方連結
參考:

項目裡原始版本:
- 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以上