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

liujun pushed a commit to branch dev-metadata
in repository https://gitbox.apache.org/repos/asf/incubator-dubbo.git

commit fdc9202f9732292bd4661442df240f881118411d
Author: ken.lj <ken.lj...@gmail.com>
AuthorDate: Thu Dec 20 18:13:23 2018 +0800

    update demo
---
 .../src/main/java/org/apache/dubbo/demo/consumer/Consumer.java        | 2 ++
 .../src/main/resources/META-INF/spring/dubbo-demo-consumer.xml        | 3 ---
 dubbo-demo/dubbo-demo-provider/pom.xml                                | 4 ++++
 .../src/main/resources/META-INF/spring/dubbo-demo-provider.xml        | 2 ++
 4 files changed, 8 insertions(+), 3 deletions(-)

diff --git 
a/dubbo-demo/dubbo-demo-consumer/src/main/java/org/apache/dubbo/demo/consumer/Consumer.java
 
b/dubbo-demo/dubbo-demo-consumer/src/main/java/org/apache/dubbo/demo/consumer/Consumer.java
index 80d3eff..2122696 100644
--- 
a/dubbo-demo/dubbo-demo-consumer/src/main/java/org/apache/dubbo/demo/consumer/Consumer.java
+++ 
b/dubbo-demo/dubbo-demo-consumer/src/main/java/org/apache/dubbo/demo/consumer/Consumer.java
@@ -18,6 +18,7 @@ package org.apache.dubbo.demo.consumer;
 
 import org.apache.dubbo.demo.DemoService;
 import org.apache.dubbo.rpc.RpcContext;
+
 import org.springframework.context.support.ClassPathXmlApplicationContext;
 
 public class Consumer {
@@ -31,6 +32,7 @@ public class Consumer {
         ClassPathXmlApplicationContext context = new 
ClassPathXmlApplicationContext(new 
String[]{"META-INF/spring/dubbo-demo-consumer.xml"});
         context.start();
         DemoService demoService = (DemoService) 
context.getBean("demoService"); // get remote service proxy
+//        DemoService demoService1 = (DemoService) 
context.getBean("demoService1"); // get remote service proxy
         while (true) {
             try {
                 Thread.sleep(1000);
diff --git 
a/dubbo-demo/dubbo-demo-consumer/src/main/resources/META-INF/spring/dubbo-demo-consumer.xml
 
b/dubbo-demo/dubbo-demo-consumer/src/main/resources/META-INF/spring/dubbo-demo-consumer.xml
index 3475d19..dc4bd42 100644
--- 
a/dubbo-demo/dubbo-demo-consumer/src/main/resources/META-INF/spring/dubbo-demo-consumer.xml
+++ 
b/dubbo-demo/dubbo-demo-consumer/src/main/resources/META-INF/spring/dubbo-demo-consumer.xml
@@ -27,9 +27,6 @@
 
     <dubbo:registry group="dubboregistrygroup1" 
address="zookeeper://127.0.0.1:2181"/>
 
-    <!--<dubbo:configcenter address="zookeeper://127.0.0.1:2181" 
namespace="dubboregistrygroup1"-->
-    <!--configfile="dubbo.properties"/>-->
-
     <!-- generate proxy for the remote service, then demoService can be used 
in the same way as the
     local regular interface -->
     <dubbo:reference id="demoService" check="false"
diff --git a/dubbo-demo/dubbo-demo-provider/pom.xml 
b/dubbo-demo/dubbo-demo-provider/pom.xml
index 3ce3320..601721a 100644
--- a/dubbo-demo/dubbo-demo-provider/pom.xml
+++ b/dubbo-demo/dubbo-demo-provider/pom.xml
@@ -71,5 +71,9 @@
             <groupId>org.apache.dubbo</groupId>
             <artifactId>dubbo-metadata-report-redis</artifactId>
         </dependency>
+        <dependency>
+            <groupId>org.apache.dubbo</groupId>
+            <artifactId>dubbo-qos</artifactId>
+        </dependency>
     </dependencies>
 </project>
diff --git 
a/dubbo-demo/dubbo-demo-provider/src/main/resources/META-INF/spring/dubbo-demo-provider.xml
 
b/dubbo-demo/dubbo-demo-provider/src/main/resources/META-INF/spring/dubbo-demo-provider.xml
index 02bd06e..196f239 100644
--- 
a/dubbo-demo/dubbo-demo-provider/src/main/resources/META-INF/spring/dubbo-demo-provider.xml
+++ 
b/dubbo-demo/dubbo-demo-provider/src/main/resources/META-INF/spring/dubbo-demo-provider.xml
@@ -34,6 +34,8 @@
     <!-- use dubbo protocol to export service on port 20880 -->
     <dubbo:protocol name="dubbo" port="-1"/>
 
+    <dubbo:config-center highest-priority="false" 
config-file="dubbo.properties"/>
+
     <!-- service implementation, as same as regular local bean -->
     <bean id="demoService" 
class="org.apache.dubbo.demo.provider.DemoServiceImpl"/>
 

Reply via email to