Skip to content

Commit

Permalink
Merge pull request #129 from jasonjoo2010/version_wildcard
Browse files Browse the repository at this point in the history
Make it subscribing all possible targets when set version to '*' or empty
  • Loading branch information
ralf0131 committed Aug 8, 2019
2 parents 1f87fb3 + d3bcd86 commit 2457af4
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/dubbo/src/registry/registry.ts
Expand Up @@ -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;
Expand Down

0 comments on commit 2457af4

Please sign in to comment.