You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dubbo.apache.org by il...@apache.org on 2018/11/12 09:07:31 UTC

[incubator-dubbo-website] 01/02: correct URL, and callback key in the demo code

This is an automated email from the ASF dual-hosted git repository.

iluo pushed a commit to branch asf-site
in repository https://gitbox.apache.org/repos/asf/incubator-dubbo-website.git

commit 384b303e2def8f16aa6f0f8aa9c4ebd4db04e9e7
Author: beiwei.ly <be...@alibaba-inc.com>
AuthorDate: Mon Nov 12 17:02:49 2018 +0800

    correct URL, and callback key in the demo code
---
 docs/en-us/user/demos/callback-parameter.md | 4 ++--
 docs/zh-cn/user/demos/callback-parameter.md | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/docs/en-us/user/demos/callback-parameter.md b/docs/en-us/user/demos/callback-parameter.md
index 23f3b70..afcd581 100644
--- a/docs/en-us/user/demos/callback-parameter.md
+++ b/docs/en-us/user/demos/callback-parameter.md
@@ -1,6 +1,6 @@
 # Callback parameter
 
-The parameter callback is the same as calling a local callback or listener, just declare which parameter is a callback type in Spring's configuration file, and Dubbo will generate a reverse proxy based on the long connection so that client logic can be called from the server.Can ref to [Sample code in the dubbo project](https://github.com/apache/incubator-dubbo/tree/master/dubbo-test/dubbo-test-examples/src/main/java/com/alibaba/dubbo/examples/callback).
+The parameter callback is the same as calling a local callback or listener, just declare which parameter is a callback type in Spring's configuration file, and Dubbo will generate a reverse proxy based on the long connection so that client logic can be called from the server.Can ref to [Sample code in the dubbo project](https://github.com/dubbo/dubbo-samples/tree/master/dubbo-samples-callback).
 
 ## Example of service interface
 
@@ -100,7 +100,7 @@ context.start();
 
 CallbackService callbackService = (CallbackService) context.getBean("callbackService");
 
-callbackService.addListener("http://10.20.160.198/wiki/display/dubbo/foo.bar", new CallbackListener(){
+callbackService.addListener("foo.bar", new CallbackListener(){
     public void changed(String msg) {
         System.out.println("callback1:" + msg);
     }
diff --git a/docs/zh-cn/user/demos/callback-parameter.md b/docs/zh-cn/user/demos/callback-parameter.md
index fbfd1e8..9790038 100644
--- a/docs/zh-cn/user/demos/callback-parameter.md
+++ b/docs/zh-cn/user/demos/callback-parameter.md
@@ -1,6 +1,6 @@
 # 参数回调
 
-参数回调方式与调用本地 callback 或 listener 相同,只需要在 Spring 的配置文件中声明哪个参数是 callback 类型即可。Dubbo 将基于长连接生成反向代理,这样就可以从服务器端调用客户端逻辑 [^1]。可以参考 [dubbo 项目中的示例代码](https://github.com/apache/incubator-dubbo/tree/master/dubbo-test/dubbo-test-examples/src/main/java/com/alibaba/dubbo/examples/callback)。
+参数回调方式与调用本地 callback 或 listener 相同,只需要在 Spring 的配置文件中声明哪个参数是 callback 类型即可。Dubbo 将基于长连接生成反向代理,这样就可以从服务器端调用客户端逻辑 [^1]。可以参考 [dubbo 项目中的示例代码](https://github.com/dubbo/dubbo-samples/tree/master/dubbo-samples-callback)。
 
 #### 服务接口示例
 
@@ -102,7 +102,7 @@ context.start();
  
 CallbackService callbackService = (CallbackService) context.getBean("callbackService");
  
-callbackService.addListener("http://10.20.160.198/wiki/display/dubbo/foo.bar", new CallbackListener(){
+callbackService.addListener("foo.bar", new CallbackListener(){
     public void changed(String msg) {
         System.out.println("callback1:" + msg);
     }