Expected single matching of application, but found 2 instances, will randomly pick the first one.
生活随笔
收集整理的這篇文章主要介紹了
Expected single matching of application, but found 2 instances, will randomly pick the first one.
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
Expected single matching of application, but found 2 instances, will randomly pick the first one.
在項目啟動時發現了警告日志信息意思是:dubbo發現了兩個<dubbo:application name=“XXX”/> 實例,隨機選擇了第一個。
檢查配置文件的確是配置了一個,經過Debug,發現在ConfigManger.getConfig(String configType) 方法來看,的確是有兩個配置實例。
經過翻看Dubbo的issue,查看到這兩個問題:
經過驗證第一個問題在其后續的版本:2.7.16并沒有解決其問題;
在第二個問題的討論區發現有人詢問上述問題(該問題雖不影響使用,但是對有代碼潔癖的人有點。。。),然后其開發人員說在3.0.6 版本開始修復了此問題
https://github.com/apache/dubbo/issues/6461
https://github.com/apache/dubbo/issues/9656
dubbo:application 配置文檔:
https://dubbo.apache.org/zh/docs/v2.7/user/references/xml/dubbo-application/
總結
以上是生活随笔為你收集整理的Expected single matching of application, but found 2 instances, will randomly pick the first one.的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 08_MySQL的函数
- 下一篇: 大型分布式网站架构如何设计