You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dubbo.apache.org by li...@apache.org on 2019/08/27 01:27:14 UTC
[dubbo] 05/05: generate urls directly for non-dubbo service
instances.
This is an automated email from the ASF dual-hosted git repository.
liujun pushed a commit to branch cloud-native
in repository https://gitbox.apache.org/repos/asf/dubbo.git
commit 4cf629d96a520d7afea0ac15256e273ab3ca669a
Author: ken.lj <ke...@gmail.com>
AuthorDate: Tue Aug 27 09:26:55 2019 +0800
generate urls directly for non-dubbo service instances.
---
.../org/apache/dubbo/registry/client/ServiceDiscoveryRegistry.java | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/dubbo-registry/dubbo-registry-api/src/main/java/org/apache/dubbo/registry/client/ServiceDiscoveryRegistry.java b/dubbo-registry/dubbo-registry-api/src/main/java/org/apache/dubbo/registry/client/ServiceDiscoveryRegistry.java
index 5368b56..e728727 100644
--- a/dubbo-registry/dubbo-registry-api/src/main/java/org/apache/dubbo/registry/client/ServiceDiscoveryRegistry.java
+++ b/dubbo-registry/dubbo-registry-api/src/main/java/org/apache/dubbo/registry/client/ServiceDiscoveryRegistry.java
@@ -76,6 +76,7 @@ import static org.apache.dubbo.common.function.ThrowableAction.execute;
import static org.apache.dubbo.common.utils.CollectionUtils.isEmpty;
import static org.apache.dubbo.common.utils.CollectionUtils.isEmptyMap;
import static org.apache.dubbo.common.utils.CollectionUtils.isNotEmpty;
+import static org.apache.dubbo.common.utils.DubboServiceLoader.loadServices;
import static org.apache.dubbo.common.utils.StringUtils.isBlank;
import static org.apache.dubbo.metadata.WritableMetadataService.DEFAULT_EXTENSION;
import static org.apache.dubbo.registry.client.ServiceDiscoveryFactory.getExtension;
@@ -399,7 +400,7 @@ public class ServiceDiscoveryRegistry extends FailbackRegistry {
if (ServiceInstanceMetadataUtils.isDubboServiceInstance(serviceInstances.get(0))) {
initTemplateURLs(subscribedURL, serviceInstances);
// Clone the subscribed URLs from the template URLs
- subscribedURLs = cloneSubscribedURLs(subscribedURL, serviceInstances);
+ subscribedURLs = cloneExportedURLs(subscribedURL, serviceInstances);
} else {
for (ServiceInstance instance : serviceInstances) {
URLBuilder builder = new URLBuilder(