Skip to content

Conversation

@fuyuwei01
Copy link
Contributor

No description provided.

private GreetingService greetingService;

@DubboReference(version = "1.0.0", providedBy = "dubbo-quickstart-provider")
@DubboReference(version = "1.0.0")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

为什么需要删除providedBy?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

providedBy字段是多余的。providedBy = "dubbo-quickstart-provider"指定了使用名为dubbo-quickstart-provider的dubbo应用作为provider。启动demo的provider和consumer时,不用providedBy字段也能调用到dubbo-quickstart-provider中的服务。

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

providedBy可以指定从某个被调服务获取服务信息数据,这个字段的作用可以再研究一下,填与不填的区别。

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

providedBy可以指定从某个被调服务获取服务信息数据,这个字段的作用可以再研究一下,填与不填的区别。

不填写的时候,会通过mapping元数据找到提供该接口服务的全部应用,然后从北极星拉取这些应用的实例列表完成服务发现。

Copy link
Member

@SkyeBeFreeman SkyeBeFreeman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@SkyeBeFreeman SkyeBeFreeman merged commit 36693e3 into polarismesh:dubbo-3.2.x Nov 14, 2025
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants