moremind commented on code in PR #5708:
URL: https://github.com/apache/shenyu/pull/5708#discussion_r1994995588


##########
shenyu-plugin/shenyu-plugin-proxy/shenyu-plugin-rpc/shenyu-plugin-dubbo/shenyu-plugin-apache-dubbo/src/main/java/org/apache/shenyu/plugin/apache/dubbo/cache/ApacheDubboConfigCache.java:
##########
@@ -205,6 +205,16 @@ private ReferenceConfig<GenericService> 
buildReference(final MetaData metaData,
         reference.setRegistry(registryConfig);
         reference.setConsumer(consumerConfig);
         reference.setInterface(metaData.getServiceName());
+        
+        // Fix dubbo application discover cannot get service provider 
information #5708
+        try {
+            ConfigManager configManager = 
reference.getApplicationModel().getApplicationConfigManager();
+            if (CollectionUtils.isEmpty(configManager.getDefaultRegistries())){
+                configManager.addRegistry(registryConfig);
+            }
+        }catch (Throwable e){
+            //  no supported , do noting

Review Comment:
   you should logging there



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to