This is an automated email from the ASF dual-hosted git repository. huxing pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/dubbo-js.git
The following commit(s) were added to refs/heads/master by this push: new d3bcd86 Make it subscribing all possible targets when set version to '*' or just skip it new 2457af4 Merge pull request #129 from jasonjoo2010/version_wildcard d3bcd86 is described below commit d3bcd861b53ff4c8ca2c079e94a0f8b8f942fdce Author: Jason Joo <hblz...@163.com> AuthorDate: Mon Aug 5 10:45:17 2019 +0800 Make it subscribing all possible targets when set version to '*' or just skip it --- packages/dubbo/src/registry/registry.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/dubbo/src/registry/registry.ts b/packages/dubbo/src/registry/registry.ts index db6fe73..42e4c86 100644 --- a/packages/dubbo/src/registry/registry.ts +++ b/packages/dubbo/src/registry/registry.ts @@ -45,7 +45,10 @@ export default class Registry<T = {}> { return this._dubboServiceUrlMap .get(dubboInterface) .filter(serviceProp => { - const isSameVersion = serviceProp.version === version; + // "*" refer to default wildcard in dubbo + const isSameVersion = !version + || version == '*' + || serviceProp.version === version; //如果Group为null,就默认匹配, 不检查group //如果Group不为null,确保group和接口的group一致 const isSameGroup = !group || group === serviceProp.group;