Clay

用进废退 | 工字不出头

  • 主页
  • 归档
  • 随笔
  • 搜索
所有文章

Clay

用进废退 | 工字不出头

  • 主页
  • 归档
  • 随笔

Dubbo之四Dubbo踩坑记录

发表于:2019-05-31
字数统计:212
阅读量统计:

SpringBoot-2.1.0+ 整合 Apache Dubbo-2.7.0,启动应用后提示需要添加SpringBoot配置 “spring.main.allow-bean-definition-overriding=true”

异常日志:

1
2
3
4
5
6
7
8
9
10
11
***************************
APPLICATION FAILED TO START
***************************

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

异常分析:

1
2
3
问题是由注解 @EnableDubbo、@EnableDubboConfig 的使用所导致,具体可参考以下资料:
https://github.com/apache/dubbo/issues/3193
https://github.com/apache/dubbo-spring-boot-project/issues/476

解决方法:

1
2
3
4
5
方法一:
往SpringBoot的配置文件(application.properties)中添加对应配置,允许在Spring容器内可以覆盖Bean的定义: spring.main.allow-bean-definition-overriding=true

方法二:
将Apache Dubbo-2.7.0 升级到 Apache Dubbo-2.7.1版本,具体可参考:https://github.com/apache/dubbo-spring-boot-project/issues/467

本文作者: Clay
发布时间: 2019-05-31 23:12:43
最后更新: 2019-06-01 20:23:41
本文链接: https://www.techgrow.cn/posts/c944ed24.html
版权声明: 本作品采用 知识共享署名-非商业性使用-相同方式共享 4.0 国际许可协议 进行许可。转载请注明出处!
赏

谢谢你的支持

支付宝
微信
  • 分布式

扫一扫,分享到微信

微信分享二维码
Dubbo之五Dubbo开发随记
ZooKeeper 踩坑记录
© 2021 Clay
本站总访问量  人次
载入天数...载入时分秒...
粤ICP备19024664号
  • 所有文章

显示标签:

  • AI
  • C/C++
  • CI/CD
  • CentOS
  • Centos
  • Docker
  • HarmonyOS
  • Java
  • Linux
  • Manjaro
  • Python
  • Web服务器
  • 企业面试
  • 分布式
  • 前端
  • 区块链
  • 开发工具
  • 开源
  • 微服务
  • 数据库
  • 架构
  • 树莓派
  • 爬虫
  • 版本控制
  • 知识图谱
  • 算法与数据结构
  • 缓存
  • 网络攻防
  • 随笔

    [^_^] 出错啦!请重新刷新页面!