提交 39c7abc8 编写于 作者: 武汉红喜's avatar 武汉红喜

关于@Reference的registry属性说明

上级 3f24ee76
......@@ -12,7 +12,10 @@ import org.springframework.stereotype.Component;
@Component
public class DemoRpc {
@Reference(check = false)
/**
* 当不指定registry时,Reference会从所有含有该service的registry里选择一个registry
*/
@Reference(registry = "defaultRegistry", check = false)
private DemoService demoService;
@Reference(registry = "otherRegistry", check = false)
......
......@@ -6,7 +6,7 @@ dubbo:
registry:
protocol: zookeeper
address: 127.0.0.1:2181
id: my-registry
id: defaultRegistry
protocol:
port: 20882
name: dubbo
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册