SpringBoot整合Dubbo

本文主要记录了springboot整合dubbo实现服务调用的过程及遇到的问题处理办法

用到的组件 :

  • Springboot
  • Dubbo
  • Dubbo Admin
  • Zookeeper

简介:
Springboot 和Dubbo整合在一起作为 服务的提供者和消费者的基础框架,文中中只是实现一个最简单的服务调用过程,不涉及任何业务逻辑、数据库、安全、缓存等组件,甚至日志组件能不用就没有使用。 文中使用 Zookeeper作为注册中心,使用 Dubbo Admin 作为服务监控中心。

主要步骤:安装注册中心,安装服务监控中心,注册服务,消费服务。
其中记录了服务的注册与调用xml配置文件和注解两种形式

步骤一: 安装 注册中心(Zookeeper - 单机模式 )

  1. 下载 zookeeper 安装包(apache-zookeeper-x.x.x.tar.gz)
    地址:http://mirror.bit.edu.cn/apache/zookeeper/
  2. 将安装包上传到 虚拟机(Linux)并解压该文件
    在这里插入图片描述
    2.1 解压该压缩包:tar -zxvf zookeeper-3.4.5.tar.gz
    2.2 得到 zookeeper-3.4.5 文件夹
    2.3 重命名该文件夹 mv zookeeper-3.4.5 zookeeper
  3. 启动 zookeeper
    3.1 进入 zookeeper/conf/ 目录,复制一个 zoo_sample.cfg 文件和该文件同目录且为 zoo.cfg 的文件 : cp zoo_sample.cfg ./zoo.cfg
    在这里插入图片描述
    3.2 可以选择性的修改zookeeper的端口号,其默认是2181,这里修改成 6666
    在这里插入图片描述
  4. 启动 zookeeper 服务
    进入到安装目录的 zookeeper/bin
    在这里插入图片描述
    执行命令: ./zkServer.sh start (注意命令最前面的符号点不要漏掉)
    执行结果
    在这里插入图片描述
    客户端可执行命令如下图:
    在这里插入图片描述
    到这里 zookeeper 服务店已经启动完成。
    若是虚拟机开了防火墙,还需要暴露 zookeeper的端口卡,以便外部应用连接zookeeper:
Redhat Linux 开启防火墙及开发端口

开启防火墙:
chkconfig iptables on
service iptables start
查看3306端口是否打开:
lsof -i:3306

开放3306端口:

iptables -I INPUT -i eth0 -p tcp --dport 3306 -j ACCEPT
iptables  -I OUTPUT -o eth0 -p tcp --sport 3306 -j ACCEPT
然后保存
## /etc/rc.d/init.d/iptables save 

 Centos7开放及查看端口
 
1、开放端口
firewall-cmd --zone=public --add-port=6666/tcp --permanent   # 开放5672端口
firewall-cmd --reload   # 配置立即生效

2. 关闭端口
firewall-cmd --zone=public --remove-port=6666/tcp --permanent  #关闭5672端口
firewall-cmd --reload   # 配置立即生效

步骤二 : 安装 Dubbo Admin

  1. 下载地址:https://github.com/apache/dubbo-admin
    或者直接 git clone https://github.com/apache/dubbo-admin.git
    在这里插入图片描述

  2. 修改zookeeper的地址: dubbo-admin-server/src/main/resources/application.properties 在这里插入图片描述3.编译项目

    mvn clean package

    在这里插入图片描述 在这里插入图片描述

    1. 运行项目
      mvn --projects dubbo-admin-server spring-boot:run
      OR
      cd dubbo-admin-distribution/target; java -jar dubbo-admin-0.1.jar
      在这里插入图片描述

    5 浏览 http://localhost:8080

    在这里插入图片描述

  3. 点击服务查询即可查询当前所有的服务
    在这里插入图片描述

到这里,监控中心就安装完了。下面就可以建立我们的服务了。

步骤三: 建立dubbo服务,注解方式,xml 方式
说明:服务搭建过程中并非直接是最终代码,而是从零开始,遇到问题就解决问题的记录下来。

  1. 创建 一个简单 的 springboot Maven工程
    在这里插入图片描述
    在这里插入图片描述
    在这里插入图片描述
    在这里插入图片描述
  2. 引如 dubbo 依赖 :
		<!-- Dubbo 依賴 -->
        <dependency>
            <groupId>io.dubbo.springboot</groupId>
            <artifactId>spring-boot-starter-dubbo</artifactId>
            <version>1.0.0</version>
        </dependency>

pom.xml

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <parent>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-parent</artifactId>
        <version>2.1.8.RELEASE</version>
        <relativePath/> <!-- lookup parent from repository -->
    </parent>
    <groupId>com.example.hello</groupId>
    <artifactId>boot-dubbo-hello-service</artifactId>
    <version>0.0.1-SNAPSHOT</version>
    <name>boot-dubbo-hello-service</name>
    <description>Demo project for Spring Boot</description>

    <properties>
        <java.version>1.8</java.version>
    </properties>

    <dependencies>

        <!-- Dubbo 依賴 -->
        <dependency>
            <groupId>io.dubbo.springboot</groupId>
            <artifactId>spring-boot-starter-dubbo</artifactId>
            <version>1.0.0</version>
        </dependency>

		<!-- spring-boot-starter-dubbo 中已有该依赖,故去掉这个 -->
        <!--<dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter</artifactId>
        </dependency>-->

        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-test</artifactId>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
            </plugin>
        </plugins>
    </build>

</project>

  1. 新建 service service.impl 文件夹,创建 IHelloService.java 接口和 HelloServiceImpl.java 实现类如下:
    在这里插入图片描述
    IHelloService.java :
package com.example.hello.service;

/**
 * 测试基础服务
 * @author xxx
 * */
public interface IHelloService {

    /**
     *  简单接口
     * @param name 名称
     * @return 招呼语
     * */
    String sayHello(String name);
}

HelloServiceImpl.java : 注意 @Service 为 Dubbo 包中的注解

package com.example.hello.service.impl;

import com.alibaba.dubbo.config.annotation.Service;
import com.example.hello.service.IHelloService;

/**
 *  基础服务实现
 * @author xxx
 * */
@Service(version = "1.0.0",group = "G_APP_DEMO",timeout = 1000,owner = "_xxx")
public class HelloServiceImpl implements IHelloService {

    /**
     *  hello 接口
     * @param name 名称
     * @return 招呼语
     * */
    @Override
    public String sayHello(String name) {
        return null;
    }
}

  1. 设置dubbo基础属性,编译 resources/application.properties:
	# 应用启动端口
	server.port=9090

	### Dubbo 基础配置
	spring.dubbo.application.name=springboot-dubbo-provider
	spring.dubbo.registry.address=zookeeper://192.168.47.131
	spring.dubbo.registry.port=6666
	spring.dubbo.protocol.name=dubbo
	spring.dubbo.protocol.port=20880
	# 注意实现类包的位置
	spring.dubbo.scan=com.example.hello.service.impl
  1. 运行主类 BootDubboHelloServiceApplication.java
E:\software\java\JDK8\bin\java.exe -XX:TieredStopAtLevel=1 -noverify -Dspring.output.ansi.enabled=always -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=64051 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -Djava.rmi.server.hostname=localhost -Dspring.liveBeansView.mbeanDomain -Dspring.application.admin.enabled=true -javaagent:E:\software\idea201803\lib\idea_rt.jar=64052:E:\software\idea201803\bin -Dfile.encoding=UTF-8 -classpath E:\software\java\JDK8\jre\lib\charsets.jar;E:\software\java\JDK8\jre\lib\deploy.jar;E:\software\java\JDK8\jre\lib\ext\access-bridge-64.jar;E:\software\java\JDK8\jre\lib\ext\cldrdata.jar;E:\software\java\JDK8\jre\lib\ext\dnsns.jar;E:\software\java\JDK8\jre\lib\ext\jaccess.jar;E:\software\java\JDK8\jre\lib\ext\jfxrt.jar;E:\software\java\JDK8\jre\lib\ext\localedata.jar;E:\software\java\JDK8\jre\lib\ext\nashorn.jar;E:\software\java\JDK8\jre\lib\ext\sunec.jar;E:\software\java\JDK8\jre\lib\ext\sunjce_provider.jar;E:\software\java\JDK8\jre\lib\ext\sunmscapi.jar;E:\software\java\JDK8\jre\lib\ext\sunpkcs11.jar;E:\software\java\JDK8\jre\lib\ext\zipfs.jar;E:\software\java\JDK8\jre\lib\javaws.jar;E:\software\java\JDK8\jre\lib\jce.jar;E:\software\java\JDK8\jre\lib\jfr.jar;E:\software\java\JDK8\jre\lib\jfxswt.jar;E:\software\java\JDK8\jre\lib\jsse.jar;E:\software\java\JDK8\jre\lib\management-agent.jar;E:\software\java\JDK8\jre\lib\plugin.jar;E:\software\java\JDK8\jre\lib\resources.jar;E:\software\java\JDK8\jre\lib\rt.jar;E:\ideaSpace\springboot\springboot-web-helloworld\boot-dubbo-hello-service\target\classes;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\io\dubbo\springboot\spring-boot-starter-dubbo\1.0.0\spring-boot-starter-dubbo-1.0.0.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\org\springframework\boot\spring-boot-starter\2.1.8.RELEASE\spring-boot-starter-2.1.8.RELEASE.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\org\springframework\boot\spring-boot\2.1.8.RELEASE\spring-boot-2.1.8.RELEASE.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\org\springframework\spring-context\5.1.9.RELEASE\spring-context-5.1.9.RELEASE.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\org\springframework\spring-aop\5.1.9.RELEASE\spring-aop-5.1.9.RELEASE.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\org\springframework\spring-beans\5.1.9.RELEASE\spring-beans-5.1.9.RELEASE.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\org\springframework\spring-expression\5.1.9.RELEASE\spring-expression-5.1.9.RELEASE.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\org\springframework\boot\spring-boot-autoconfigure\2.1.8.RELEASE\spring-boot-autoconfigure-2.1.8.RELEASE.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\org\springframework\boot\spring-boot-starter-logging\2.1.8.RELEASE\spring-boot-starter-logging-2.1.8.RELEASE.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\ch\qos\logback\logback-classic\1.2.3\logback-classic-1.2.3.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\ch\qos\logback\logback-core\1.2.3\logback-core-1.2.3.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\org\apache\logging\log4j\log4j-to-slf4j\2.11.2\log4j-to-slf4j-2.11.2.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\org\apache\logging\log4j\log4j-api\2.11.2\log4j-api-2.11.2.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\org\slf4j\jul-to-slf4j\1.7.28\jul-to-slf4j-1.7.28.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\javax\annotation\javax.annotation-api\1.3.2\javax.annotation-api-1.3.2.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\org\yaml\snakeyaml\1.23\snakeyaml-1.23.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\com\alibaba\dubbo\2.5.3\dubbo-2.5.3.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\org\javassist\javassist\3.15.0-GA\javassist-3.15.0-GA.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\org\jboss\netty\netty\3.2.5.Final\netty-3.2.5.Final.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\com\101tec\zkclient\0.7\zkclient-0.7.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\org\apache\zookeeper\zookeeper\3.4.6\zookeeper-3.4.6.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\jline\jline\0.9.94\jline-0.9.94.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\io\netty\netty\3.7.0.Final\netty-3.7.0.Final.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\org\slf4j\slf4j-api\1.7.28\slf4j-api-1.7.28.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\junit\junit\4.12\junit-4.12.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\org\hamcrest\hamcrest-core\1.3\hamcrest-core-1.3.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\org\springframework\spring-core\5.1.9.RELEASE\spring-core-5.1.9.RELEASE.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\org\springframework\spring-jcl\5.1.9.RELEASE\spring-jcl-5.1.9.RELEASE.jar com.example.hello.BootDubboHelloServiceApplication

  .   ____          _            __ _ _
 /\\ / ___'_ __ _ _(_)_ __  __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
 \\/  ___)| |_)| | | | | || (_| |  ) ) ) )
  '  |____| .__|_| |_|_| |_\__, | / / / /
 =========|_|==============|___/=/_/_/_/
 :: Spring Boot ::        (v2.1.8.RELEASE)

2019-09-12 16:46:07.246  INFO 5640 --- [           main] c.a.dubbo.common.logger.LoggerFactory    : using logger: com.alibaba.dubbo.common.logger.slf4j.Slf4jLoggerAdapter
2019-09-12 16:46:07.338  INFO 5640 --- [           main] c.e.h.BootDubboHelloServiceApplication   : Starting BootDubboHelloServiceApplication on DESKTOP-EAEE93N with PID 5640 (E:\ideaSpace\springboot\springboot-web-helloworld\boot-dubbo-hello-service\target\classes started by dingsj in E:\ideaSpace\springboot\springboot-web-helloworld)
2019-09-12 16:46:07.342  INFO 5640 --- [           main] c.e.h.BootDubboHelloServiceApplication   : No active profile set, falling back to default profiles: default
Dubbo-Holder
2019-09-12 16:46:09.044  INFO 5640 --- [           main] trationDelegate$BeanPostProcessorChecker : Bean 'bootDubboHelloServiceApplication' of type [com.example.hello.BootDubboHelloServiceApplication$$EnhancerBySpringCGLIB$$fc7e5c1d] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2019-09-12 16:46:09.059  INFO 5640 --- [           main] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.boot.autoconfigure.context.PropertyPlaceholderAutoConfiguration' of type [org.springframework.boot.autoconfigure.context.PropertyPlaceholderAutoConfiguration$$EnhancerBySpringCGLIB$$3455463] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2019-09-12 16:46:09.136  INFO 5640 --- [           main] trationDelegate$BeanPostProcessorChecker : Bean 'spring.dubbo-io.dubbo.springboot.DubboProperties' of type [io.dubbo.springboot.DubboProperties] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2019-09-12 16:46:09.138  INFO 5640 --- [           main] trationDelegate$BeanPostProcessorChecker : Bean 'io.dubbo.springboot.DubboAutoConfiguration' of type [io.dubbo.springboot.DubboAutoConfiguration$$EnhancerBySpringCGLIB$$6d39826f] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2019-09-12 16:46:09.160  INFO 5640 --- [           main] trationDelegate$BeanPostProcessorChecker : Bean 'requestApplicationConfig' of type [com.alibaba.dubbo.config.ApplicationConfig] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2019-09-12 16:46:09.164  INFO 5640 --- [           main] trationDelegate$BeanPostProcessorChecker : Bean 'requestRegistryConfig' of type [com.alibaba.dubbo.config.RegistryConfig] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2019-09-12 16:46:09.168  INFO 5640 --- [           main] trationDelegate$BeanPostProcessorChecker : Bean 'requestProtocolConfig' of type [com.alibaba.dubbo.config.ProtocolConfig] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2019-09-12 16:46:09.178  INFO 5640 --- [           main] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.boot.autoconfigure.jmx.JmxAutoConfiguration' of type [org.springframework.boot.autoconfigure.jmx.JmxAutoConfiguration$$EnhancerBySpringCGLIB$$81fa5146] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2019-09-12 16:46:09.200  INFO 5640 --- [           main] trationDelegate$BeanPostProcessorChecker : Bean 'objectNamingStrategy' of type [org.springframework.boot.autoconfigure.jmx.ParentAwareNamingStrategy] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2019-09-12 16:46:09.224  INFO 5640 --- [           main] trationDelegate$BeanPostProcessorChecker : Bean 'mbeanServer' of type [com.sun.jmx.mbeanserver.JmxMBeanServer] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2019-09-12 16:46:09.234  INFO 5640 --- [           main] trationDelegate$BeanPostProcessorChecker : Bean 'mbeanExporter' of type [org.springframework.jmx.export.annotation.AnnotationMBeanExporter] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2019-09-12 16:46:09.240  INFO 5640 --- [           main] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.boot.autoconfigure.admin.SpringApplicationAdminJmxAutoConfiguration' of type [org.springframework.boot.autoconfigure.admin.SpringApplicationAdminJmxAutoConfiguration$$EnhancerBySpringCGLIB$$953b82f8] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2019-09-12 16:46:09.293  INFO 5640 --- [           main] trationDelegate$BeanPostProcessorChecker : Bean 'springApplicationAdminRegistrar' of type [org.springframework.boot.admin.SpringApplicationAdminMXBeanRegistrar] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2019-09-12 16:46:09.295  INFO 5640 --- [           main] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.boot.autoconfigure.context.ConfigurationPropertiesAutoConfiguration' of type [org.springframework.boot.autoconfigure.context.ConfigurationPropertiesAutoConfiguration$$EnhancerBySpringCGLIB$$f2186d78] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2019-09-12 16:46:09.305  INFO 5640 --- [           main] trationDelegate$BeanPostProcessorChecker : Bean 'spring.info-org.springframework.boot.autoconfigure.info.ProjectInfoProperties' of type [org.springframework.boot.autoconfigure.info.ProjectInfoProperties] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2019-09-12 16:46:09.311  INFO 5640 --- [           main] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.boot.autoconfigure.info.ProjectInfoAutoConfiguration' of type [org.springframework.boot.autoconfigure.info.ProjectInfoAutoConfiguration$$EnhancerBySpringCGLIB$$3e88ef43] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2019-09-12 16:46:09.316  INFO 5640 --- [           main] trationDelegate$BeanPostProcessorChecker : Bean 'spring.task.execution-org.springframework.boot.autoconfigure.task.TaskExecutionProperties' of type [org.springframework.boot.autoconfigure.task.TaskExecutionProperties] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2019-09-12 16:46:09.324  INFO 5640 --- [           main] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.boot.autoconfigure.task.TaskExecutionAutoConfiguration' of type [org.springframework.boot.autoconfigure.task.TaskExecutionAutoConfiguration$$EnhancerBySpringCGLIB$$8e2e7b00] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2019-09-12 16:46:09.345  INFO 5640 --- [           main] trationDelegate$BeanPostProcessorChecker : Bean 'taskExecutorBuilder' of type [org.springframework.boot.task.TaskExecutorBuilder] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2019-09-12 16:46:09.354  INFO 5640 --- [           main] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.boot.autoconfigure.task.TaskSchedulingAutoConfiguration' of type [org.springframework.boot.autoconfigure.task.TaskSchedulingAutoConfiguration$$EnhancerBySpringCGLIB$$b64e5e40] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2019-09-12 16:46:09.358  INFO 5640 --- [           main] trationDelegate$BeanPostProcessorChecker : Bean 'spring.task.scheduling-org.springframework.boot.autoconfigure.task.TaskSchedulingProperties' of type [org.springframework.boot.autoconfigure.task.TaskSchedulingProperties] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2019-09-12 16:46:09.372  INFO 5640 --- [           main] trationDelegate$BeanPostProcessorChecker : Bean 'taskSchedulerBuilder' of type [org.springframework.boot.task.TaskSchedulerBuilder] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2019-09-12 16:46:09.382  INFO 5640 --- [           main] trationDelegate$BeanPostProcessorChecker : Bean 'helloServiceImpl' of type [com.example.hello.service.impl.HelloServiceImpl] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2019-09-12 16:46:09.765  INFO 5640 --- [           main] com.alibaba.dubbo.config.AbstractConfig  :  [DUBBO] Export dubbo service com.example.hello.service.IHelloService to local registry, dubbo version: 2.5.3, current host: 127.0.0.1
2019-09-12 16:46:09.765  INFO 5640 --- [           main] com.alibaba.dubbo.config.AbstractConfig  :  [DUBBO] Export dubbo service com.example.hello.service.IHelloService to url dubbo://192.168.47.1:20880/com.example.hello.service.IHelloService?anyhost=true&application=springboot-dubbo-provider&dubbo=2.5.3&group=G_APP_DEMO&interface=com.example.hello.service.IHelloService&methods=sayHello&owner=_xxx&pid=5640&revision=1.0.0&side=provider&timeout=1000&timestamp=1568277969650&version=1.0.0, dubbo version: 2.5.3, current host: 127.0.0.1
2019-09-12 16:46:09.765  INFO 5640 --- [           main] com.alibaba.dubbo.config.AbstractConfig  :  [DUBBO] Register dubbo service com.example.hello.service.IHelloService url dubbo://192.168.47.1:20880/com.example.hello.service.IHelloService?anyhost=true&application=springboot-dubbo-provider&dubbo=2.5.3&group=G_APP_DEMO&interface=com.example.hello.service.IHelloService&methods=sayHello&owner=_xxx&pid=5640&revision=1.0.0&side=provider&timeout=1000&timestamp=1568277969650&version=1.0.0 to registry registry://192.168.47.131:6666/com.alibaba.dubbo.registry.RegistryService?application=springboot-dubbo-provider&dubbo=2.5.3&pid=5640&registry=zookeeper&timestamp=1568277969633, dubbo version: 2.5.3, current host: 127.0.0.1
2019-09-12 16:46:09.996  INFO 5640 --- [           main] c.a.d.remoting.transport.AbstractServer  :  [DUBBO] Start NettyServer bind /0.0.0.0:20880, export /192.168.47.1:20880, dubbo version: 2.5.3, current host: 127.0.0.1
2019-09-12 16:46:10.029  INFO 5640 --- [           main] c.a.d.r.zookeeper.ZookeeperRegistry      :  [DUBBO] Load registry store file C:\Users\dingsj\.dubbo\dubbo-registry-192.168.47.131.cache, data: {com.example.consumer.service.MyService:1.0.0=empty://192.168.47.1:20880/com.example.consumer.service.MyService?anyhost=true&application=springboot-dubbo-provider&category=configurators&check=false&dubbo=2.5.3&interface=com.example.consumer.service.MyService&methods=hello&owner=_ding&pid=24432&revision=1.0.0&side=provider&timeout=1000&timestamp=1568170569126&version=1.0.0, G_APP_DEMO/com.example.consumer.service.MyService:1.0.0=empty://192.168.47.1:20880/com.example.consumer.service.MyService?anyhost=true&application=springboot-dubbo-provider&category=configurators&check=false&dubbo=2.5.3&group=G_APP_DEMO&interface=com.example.consumer.service.MyService&methods=hello&owner=_ding&pid=20344&revision=1.0.0&side=provider&timeout=1000&timestamp=1568190333231&version=1.0.0, com.example.pro.springbootservice.service.MyService=empty://192.168.47.1/com.example.pro.springbootservice.service.MyService?application=dubbo-consumer&category=configurators&dubbo=2.5.3&interface=com.example.pro.springbootservice.service.MyService&methods=hello1,hello,bye&pid=24008&side=consumer&timestamp=1568104057826 empty://192.168.47.1/com.example.pro.springbootservice.service.MyService?application=dubbo-consumer&category=routers&dubbo=2.5.3&interface=com.example.pro.springbootservice.service.MyService&methods=hello1,hello,bye&pid=24008&side=consumer&timestamp=1568104057826 empty://192.168.47.1/com.example.pro.springbootservice.service.MyService?application=dubbo-consumer&category=providers&dubbo=2.5.3&interface=com.example.pro.springbootservice.service.MyService&methods=hello1,hello,bye&pid=24008&side=consumer&timestamp=1568104057826}, dubbo version: 2.5.3, current host: 127.0.0.1
2019-09-12 16:46:10.038  WARN 5640 --- [           main] s.c.a.AnnotationConfigApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'helloServiceImpl' defined in file [E:\ideaSpace\springboot\springboot-web-helloworld\boot-dubbo-hello-service\target\classes\com\example\hello\service\impl\HelloServiceImpl.class]: Initialization of bean failed; nested exception is java.lang.NoClassDefFoundError: org/apache/log4j/Logger
2019-09-12 16:46:10.051  INFO 5640 --- [           main] ConditionEvaluationReportLoggingListener : 

Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
2019-09-12 16:46:10.071 ERROR 5640 --- [           main] o.s.boot.SpringApplication               : Application run failed

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'helloServiceImpl' defined in file [E:\ideaSpace\springboot\springboot-web-helloworld\boot-dubbo-hello-service\target\classes\com\example\hello\service\impl\HelloServiceImpl.class]: Initialization of bean failed; nested exception is java.lang.NoClassDefFoundError: org/apache/log4j/Logger
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:601) ~[spring-beans-5.1.9.RELEASE.jar:5.1.9.RELEASE]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:515) ~[spring-beans-5.1.9.RELEASE.jar:5.1.9.RELEASE]
	at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:320) ~[spring-beans-5.1.9.RELEASE.jar:5.1.9.RELEASE]
	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) ~[spring-beans-5.1.9.RELEASE.jar:5.1.9.RELEASE]
	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:318) ~[spring-beans-5.1.9.RELEASE.jar:5.1.9.RELEASE]
	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199) ~[spring-beans-5.1.9.RELEASE.jar:5.1.9.RELEASE]
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:845) ~[spring-beans-5.1.9.RELEASE.jar:5.1.9.RELEASE]
	at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:877) ~[spring-context-5.1.9.RELEASE.jar:5.1.9.RELEASE]
	at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:549) ~[spring-context-5.1.9.RELEASE.jar:5.1.9.RELEASE]
	at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:744) [spring-boot-2.1.8.RELEASE.jar:2.1.8.RELEASE]
	at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:391) [spring-boot-2.1.8.RELEASE.jar:2.1.8.RELEASE]
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:312) [spring-boot-2.1.8.RELEASE.jar:2.1.8.RELEASE]
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:1215) [spring-boot-2.1.8.RELEASE.jar:2.1.8.RELEASE]
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:1204) [spring-boot-2.1.8.RELEASE.jar:2.1.8.RELEASE]
	at com.example.hello.BootDubboHelloServiceApplication.main(BootDubboHelloServiceApplication.java:10) [classes/:na]
Caused by: java.lang.NoClassDefFoundError: org/apache/log4j/Logger
	at org.I0Itec.zkclient.ZkClient.<clinit>(ZkClient.java:63) ~[zkclient-0.7.jar:0.7]
	at com.alibaba.dubbo.remoting.zookeeper.zkclient.ZkclientZookeeperClient.<init>(ZkclientZookeeperClient.java:25) ~[dubbo-2.5.3.jar:2.5.3]
	at com.alibaba.dubbo.remoting.zookeeper.zkclient.ZkclientZookeeperTransporter.connect(ZkclientZookeeperTransporter.java:10) ~[dubbo-2.5.3.jar:2.5.3]
	at com.alibaba.dubbo.remoting.zookeeper.ZookeeperTransporter$Adpative.connect(ZookeeperTransporter$Adpative.java) ~[na:2.5.3]
	at com.alibaba.dubbo.registry.zookeeper.ZookeeperRegistry.<init>(ZookeeperRegistry.java:71) ~[dubbo-2.5.3.jar:2.5.3]
	at com.alibaba.dubbo.registry.zookeeper.ZookeeperRegistryFactory.createRegistry(ZookeeperRegistryFactory.java:37) ~[dubbo-2.5.3.jar:2.5.3]
	at com.alibaba.dubbo.registry.support.AbstractRegistryFactory.getRegistry(AbstractRegistryFactory.java:94) ~[dubbo-2.5.3.jar:2.5.3]
	at com.alibaba.dubbo.registry.RegistryFactory$Adpative.getRegistry(RegistryFactory$Adpative.java) ~[na:2.5.3]
	at com.alibaba.dubbo.registry.integration.RegistryProtocol.getRegistry(RegistryProtocol.java:190) ~[dubbo-2.5.3.jar:2.5.3]
	at com.alibaba.dubbo.registry.integration.RegistryProtocol.export(RegistryProtocol.java:109) ~[dubbo-2.5.3.jar:2.5.3]
	at com.alibaba.dubbo.rpc.protocol.ProtocolListenerWrapper.export(ProtocolListenerWrapper.java:54) ~[dubbo-2.5.3.jar:2.5.3]
	at com.alibaba.dubbo.rpc.protocol.ProtocolFilterWrapper.export(ProtocolFilterWrapper.java:53) ~[dubbo-2.5.3.jar:2.5.3]
	at com.alibaba.dubbo.rpc.Protocol$Adpative.export(Protocol$Adpative.java) ~[na:2.5.3]
	at com.alibaba.dubbo.config.ServiceConfig.doExportUrlsFor1Protocol(ServiceConfig.java:485) ~[dubbo-2.5.3.jar:2.5.3]
	at com.alibaba.dubbo.config.ServiceConfig.doExportUrls(ServiceConfig.java:281) ~[dubbo-2.5.3.jar:2.5.3]
	at com.alibaba.dubbo.config.ServiceConfig.doExport(ServiceConfig.java:242) ~[dubbo-2.5.3.jar:2.5.3]
	at com.alibaba.dubbo.config.ServiceConfig.export(ServiceConfig.java:143) ~[dubbo-2.5.3.jar:2.5.3]
	at com.alibaba.dubbo.config.spring.AnnotationBean.postProcessAfterInitialization(AnnotationBean.java:195) ~[dubbo-2.5.3.jar:2.5.3]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsAfterInitialization(AbstractAutowireCapableBeanFactory.java:429) ~[spring-beans-5.1.9.RELEASE.jar:5.1.9.RELEASE]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1782) ~[spring-beans-5.1.9.RELEASE.jar:5.1.9.RELEASE]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:593) ~[spring-beans-5.1.9.RELEASE.jar:5.1.9.RELEASE]
	... 14 common frames omitted
Caused by: java.lang.ClassNotFoundException: org.apache.log4j.Logger
	at java.net.URLClassLoader.findClass(URLClassLoader.java:381) ~[na:1.8.0_112]
	at java.lang.ClassLoader.loadClass(ClassLoader.java:424) ~[na:1.8.0_112]
	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331) ~[na:1.8.0_112]
	at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ~[na:1.8.0_112]
	... 35 common frames omitted

启动类报错了,看着日志是com.alibaba.dubbo.remoting.zookeeper.zkclient.ZkclientZookeeperClient.
找不到日志包了,尝试着去一个依赖包来加,比如:

		<dependency>
            <groupId>log4j</groupId>
            <artifactId>log4j</artifactId>
            <version>1.2.17</version>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
            <version>1.3.0</version>
        </dependency>-->
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-log4j12</artifactId>
            <version>1.7.28</version>
        </dependency>

之后还是报 各种日志问题 ,然后加上了一个 zkClient 的包:

		<dependency>
            <groupId>com.101tec</groupId>
            <artifactId>zkclient</artifactId>
            <version>0.7</version>
        </dependency>

新的 pom.xml 文件为:

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <parent>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-parent</artifactId>
        <version>2.1.8.RELEASE</version>
        <relativePath/> <!-- lookup parent from repository -->
    </parent>
    <groupId>com.example.hello</groupId>
    <artifactId>boot-dubbo-hello-service</artifactId>
    <version>0.0.1-SNAPSHOT</version>
    <name>boot-dubbo-hello-service</name>
    <description>Demo project for Spring Boot</description>

    <properties>
        <java.version>1.8</java.version>
    </properties>

    <dependencies>

        <!-- Dubbo 依賴 -->
        <dependency>
            <groupId>io.dubbo.springboot</groupId>
            <artifactId>spring-boot-starter-dubbo</artifactId>
            <version>1.0.0</version>
        </dependency>
        <dependency>
            <groupId>com.101tec</groupId>
            <artifactId>zkclient</artifactId>
            <version>0.7</version>
        </dependency>

        
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-test</artifactId>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
            </plugin>
        </plugins>
    </build>

</project

maven 依赖如下:
在这里插入图片描述
zkclient包 在spring-boot-starter-dubbo 中是有的,只是比单独的包少些日志依赖包。
重新启动一下项目试试。

E:\software\java\JDK8\bin\java.exe -XX:TieredStopAtLevel=1 -noverify -Dspring.output.ansi.enabled=always -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=64599 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -Djava.rmi.server.hostname=localhost -Dspring.liveBeansView.mbeanDomain -Dspring.application.admin.enabled=true -javaagent:E:\software\idea201803\lib\idea_rt.jar=64600:E:\software\idea201803\bin -Dfile.encoding=UTF-8 -classpath E:\software\java\JDK8\jre\lib\charsets.jar;E:\software\java\JDK8\jre\lib\deploy.jar;E:\software\java\JDK8\jre\lib\ext\access-bridge-64.jar;E:\software\java\JDK8\jre\lib\ext\cldrdata.jar;E:\software\java\JDK8\jre\lib\ext\dnsns.jar;E:\software\java\JDK8\jre\lib\ext\jaccess.jar;E:\software\java\JDK8\jre\lib\ext\jfxrt.jar;E:\software\java\JDK8\jre\lib\ext\localedata.jar;E:\software\java\JDK8\jre\lib\ext\nashorn.jar;E:\software\java\JDK8\jre\lib\ext\sunec.jar;E:\software\java\JDK8\jre\lib\ext\sunjce_provider.jar;E:\software\java\JDK8\jre\lib\ext\sunmscapi.jar;E:\software\java\JDK8\jre\lib\ext\sunpkcs11.jar;E:\software\java\JDK8\jre\lib\ext\zipfs.jar;E:\software\java\JDK8\jre\lib\javaws.jar;E:\software\java\JDK8\jre\lib\jce.jar;E:\software\java\JDK8\jre\lib\jfr.jar;E:\software\java\JDK8\jre\lib\jfxswt.jar;E:\software\java\JDK8\jre\lib\jsse.jar;E:\software\java\JDK8\jre\lib\management-agent.jar;E:\software\java\JDK8\jre\lib\plugin.jar;E:\software\java\JDK8\jre\lib\resources.jar;E:\software\java\JDK8\jre\lib\rt.jar;E:\ideaSpace\springboot\springboot-web-helloworld\boot-dubbo-hello-service\target\classes;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\io\dubbo\springboot\spring-boot-starter-dubbo\1.0.0\spring-boot-starter-dubbo-1.0.0.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\org\springframework\boot\spring-boot-starter\2.1.8.RELEASE\spring-boot-starter-2.1.8.RELEASE.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\org\springframework\boot\spring-boot\2.1.8.RELEASE\spring-boot-2.1.8.RELEASE.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\org\springframework\spring-context\5.1.9.RELEASE\spring-context-5.1.9.RELEASE.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\org\springframework\spring-aop\5.1.9.RELEASE\spring-aop-5.1.9.RELEASE.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\org\springframework\spring-beans\5.1.9.RELEASE\spring-beans-5.1.9.RELEASE.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\org\springframework\spring-expression\5.1.9.RELEASE\spring-expression-5.1.9.RELEASE.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\org\springframework\boot\spring-boot-autoconfigure\2.1.8.RELEASE\spring-boot-autoconfigure-2.1.8.RELEASE.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\org\springframework\boot\spring-boot-starter-logging\2.1.8.RELEASE\spring-boot-starter-logging-2.1.8.RELEASE.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\ch\qos\logback\logback-classic\1.2.3\logback-classic-1.2.3.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\ch\qos\logback\logback-core\1.2.3\logback-core-1.2.3.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\org\apache\logging\log4j\log4j-to-slf4j\2.11.2\log4j-to-slf4j-2.11.2.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\org\apache\logging\log4j\log4j-api\2.11.2\log4j-api-2.11.2.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\org\slf4j\jul-to-slf4j\1.7.28\jul-to-slf4j-1.7.28.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\javax\annotation\javax.annotation-api\1.3.2\javax.annotation-api-1.3.2.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\org\yaml\snakeyaml\1.23\snakeyaml-1.23.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\com\alibaba\dubbo\2.5.3\dubbo-2.5.3.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\org\javassist\javassist\3.15.0-GA\javassist-3.15.0-GA.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\org\jboss\netty\netty\3.2.5.Final\netty-3.2.5.Final.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\com\101tec\zkclient\0.7\zkclient-0.7.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\org\slf4j\slf4j-api\1.7.28\slf4j-api-1.7.28.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\org\slf4j\slf4j-log4j12\1.7.28\slf4j-log4j12-1.7.28.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\log4j\log4j\1.2.15\log4j-1.2.15.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\javax\mail\mail\1.4\mail-1.4.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\javax\activation\activation\1.1\activation-1.1.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\org\apache\zookeeper\zookeeper\3.4.6\zookeeper-3.4.6.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\jline\jline\0.9.94\jline-0.9.94.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\io\netty\netty\3.7.0.Final\netty-3.7.0.Final.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\junit\junit\4.12\junit-4.12.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\org\hamcrest\hamcrest-core\1.3\hamcrest-core-1.3.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\org\springframework\spring-core\5.1.9.RELEASE\spring-core-5.1.9.RELEASE.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\org\springframework\spring-jcl\5.1.9.RELEASE\spring-jcl-5.1.9.RELEASE.jar com.example.hello.BootDubboHelloServiceApplication
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/E:/software/java/apache-maven-3.3.9/LIB-DOWNLOADS/ch/qos/logback/logback-classic/1.2.3/logback-classic-1.2.3.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/E:/software/java/apache-maven-3.3.9/LIB-DOWNLOADS/org/slf4j/slf4j-log4j12/1.7.28/slf4j-log4j12-1.7.28.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [ch.qos.logback.classic.util.ContextSelectorStaticBinder]

  .   ____          _            __ _ _
 /\\ / ___'_ __ _ _(_)_ __  __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
 \\/  ___)| |_)| | | | | || (_| |  ) ) ) )
  '  |____| .__|_| |_|_| |_\__, | / / / /
 =========|_|==============|___/=/_/_/_/
 :: Spring Boot ::        (v2.1.8.RELEASE)

log4j:WARN No appenders could be found for logger (com.alibaba.dubbo.common.logger.LoggerFactory).
log4j:WARN Please initialize the log4j system properly.
2019-09-12 17:02:29.429  INFO 27532 --- [           main] c.e.h.BootDubboHelloServiceApplication   : Starting BootDubboHelloServiceApplication on DESKTOP-EAEE93N with PID 27532 (E:\ideaSpace\springboot\springboot-web-helloworld\boot-dubbo-hello-service\target\classes started by dingsj in E:\ideaSpace\springboot\springboot-web-helloworld)
2019-09-12 17:02:29.440  INFO 27532 --- [           main] c.e.h.BootDubboHelloServiceApplication   : No active profile set, falling back to default profiles: default
Dubbo-Holder
2019-09-12 17:02:30.713  INFO 27532 --- [           main] trationDelegate$BeanPostProcessorChecker : Bean 'bootDubboHelloServiceApplication' of type [com.example.hello.BootDubboHelloServiceApplication$$EnhancerBySpringCGLIB$$dff4fb94] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2019-09-12 17:02:30.727  INFO 27532 --- [           main] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.boot.autoconfigure.context.PropertyPlaceholderAutoConfiguration' of type [org.springframework.boot.autoconfigure.context.PropertyPlaceholderAutoConfiguration$$EnhancerBySpringCGLIB$$e6bbf3da] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2019-09-12 17:02:30.799  INFO 27532 --- [           main] trationDelegate$BeanPostProcessorChecker : Bean 'spring.dubbo-io.dubbo.springboot.DubboProperties' of type [io.dubbo.springboot.DubboProperties] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2019-09-12 17:02:30.800  INFO 27532 --- [           main] trationDelegate$BeanPostProcessorChecker : Bean 'io.dubbo.springboot.DubboAutoConfiguration' of type [io.dubbo.springboot.DubboAutoConfiguration$$EnhancerBySpringCGLIB$$50b021e6] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2019-09-12 17:02:30.821  INFO 27532 --- [           main] trationDelegate$BeanPostProcessorChecker : Bean 'requestApplicationConfig' of type [com.alibaba.dubbo.config.ApplicationConfig] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2019-09-12 17:02:30.825  INFO 27532 --- [           main] trationDelegate$BeanPostProcessorChecker : Bean 'requestRegistryConfig' of type [com.alibaba.dubbo.config.RegistryConfig] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2019-09-12 17:02:30.829  INFO 27532 --- [           main] trationDelegate$BeanPostProcessorChecker : Bean 'requestProtocolConfig' of type [com.alibaba.dubbo.config.ProtocolConfig] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2019-09-12 17:02:30.844  INFO 27532 --- [           main] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.boot.autoconfigure.jmx.JmxAutoConfiguration' of type [org.springframework.boot.autoconfigure.jmx.JmxAutoConfiguration$$EnhancerBySpringCGLIB$$6570f0bd] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2019-09-12 17:02:30.851  INFO 27532 --- [           main] trationDelegate$BeanPostProcessorChecker : Bean 'objectNamingStrategy' of type [org.springframework.boot.autoconfigure.jmx.ParentAwareNamingStrategy] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2019-09-12 17:02:30.866  INFO 27532 --- [           main] trationDelegate$BeanPostProcessorChecker : Bean 'mbeanServer' of type [com.sun.jmx.mbeanserver.JmxMBeanServer] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2019-09-12 17:02:30.873  INFO 27532 --- [           main] trationDelegate$BeanPostProcessorChecker : Bean 'mbeanExporter' of type [org.springframework.jmx.export.annotation.AnnotationMBeanExporter] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2019-09-12 17:02:30.877  INFO 27532 --- [           main] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.boot.autoconfigure.admin.SpringApplicationAdminJmxAutoConfiguration' of type [org.springframework.boot.autoconfigure.admin.SpringApplicationAdminJmxAutoConfiguration$$EnhancerBySpringCGLIB$$78b2226f] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2019-09-12 17:02:30.890  INFO 27532 --- [           main] trationDelegate$BeanPostProcessorChecker : Bean 'springApplicationAdminRegistrar' of type [org.springframework.boot.admin.SpringApplicationAdminMXBeanRegistrar] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2019-09-12 17:02:30.891  INFO 27532 --- [           main] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.boot.autoconfigure.context.ConfigurationPropertiesAutoConfiguration' of type [org.springframework.boot.autoconfigure.context.ConfigurationPropertiesAutoConfiguration$$EnhancerBySpringCGLIB$$d58f0cef] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2019-09-12 17:02:30.894  INFO 27532 --- [           main] trationDelegate$BeanPostProcessorChecker : Bean 'spring.info-org.springframework.boot.autoconfigure.info.ProjectInfoProperties' of type [org.springframework.boot.autoconfigure.info.ProjectInfoProperties] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2019-09-12 17:02:30.896  INFO 27532 --- [           main] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.boot.autoconfigure.info.ProjectInfoAutoConfiguration' of type [org.springframework.boot.autoconfigure.info.ProjectInfoAutoConfiguration$$EnhancerBySpringCGLIB$$21ff8eba] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2019-09-12 17:02:30.898  INFO 27532 --- [           main] trationDelegate$BeanPostProcessorChecker : Bean 'spring.task.execution-org.springframework.boot.autoconfigure.task.TaskExecutionProperties' of type [org.springframework.boot.autoconfigure.task.TaskExecutionProperties] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2019-09-12 17:02:30.899  INFO 27532 --- [           main] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.boot.autoconfigure.task.TaskExecutionAutoConfiguration' of type [org.springframework.boot.autoconfigure.task.TaskExecutionAutoConfiguration$$EnhancerBySpringCGLIB$$71a51a77] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2019-09-12 17:02:30.909  INFO 27532 --- [           main] trationDelegate$BeanPostProcessorChecker : Bean 'taskExecutorBuilder' of type [org.springframework.boot.task.TaskExecutorBuilder] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2019-09-12 17:02:30.911  INFO 27532 --- [           main] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.boot.autoconfigure.task.TaskSchedulingAutoConfiguration' of type [org.springframework.boot.autoconfigure.task.TaskSchedulingAutoConfiguration$$EnhancerBySpringCGLIB$$99c4fdb7] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2019-09-12 17:02:30.914  INFO 27532 --- [           main] trationDelegate$BeanPostProcessorChecker : Bean 'spring.task.scheduling-org.springframework.boot.autoconfigure.task.TaskSchedulingProperties' of type [org.springframework.boot.autoconfigure.task.TaskSchedulingProperties] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2019-09-12 17:02:30.923  INFO 27532 --- [           main] trationDelegate$BeanPostProcessorChecker : Bean 'taskSchedulerBuilder' of type [org.springframework.boot.task.TaskSchedulerBuilder] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2019-09-12 17:02:30.932  INFO 27532 --- [           main] trationDelegate$BeanPostProcessorChecker : Bean 'helloServiceImpl' of type [com.example.hello.service.impl.HelloServiceImpl] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2019-09-12 17:02:31.436  INFO 27532 --- [           main] org.apache.zookeeper.ZooKeeper           : Client environment:zookeeper.version=3.4.6-1569965, built on 02/20/2014 09:09 GMT
2019-09-12 17:02:31.436  INFO 27532 --- [           main] org.apache.zookeeper.ZooKeeper           : Client environment:host.name=DESKTOP-EAEE93N
2019-09-12 17:02:31.436  INFO 27532 --- [           main] org.apache.zookeeper.ZooKeeper           : Client environment:java.version=1.8.0_112
2019-09-12 17:02:31.437  INFO 27532 --- [           main] org.apache.zookeeper.ZooKeeper           : Client environment:java.vendor=Oracle Corporation
2019-09-12 17:02:31.437  INFO 27532 --- [           main] org.apache.zookeeper.ZooKeeper           : Client environment:java.home=E:\software\java\JDK8\jre
2019-09-12 17:02:31.437  INFO 27532 --- [           main] org.apache.zookeeper.ZooKeeper           : Client environment:java.class.path=E:\software\java\JDK8\jre\lib\charsets.jar;E:\software\java\JDK8\jre\lib\deploy.jar;E:\software\java\JDK8\jre\lib\ext\access-bridge-64.jar;E:\software\java\JDK8\jre\lib\ext\cldrdata.jar;E:\software\java\JDK8\jre\lib\ext\dnsns.jar;E:\software\java\JDK8\jre\lib\ext\jaccess.jar;E:\software\java\JDK8\jre\lib\ext\jfxrt.jar;E:\software\java\JDK8\jre\lib\ext\localedata.jar;E:\software\java\JDK8\jre\lib\ext\nashorn.jar;E:\software\java\JDK8\jre\lib\ext\sunec.jar;E:\software\java\JDK8\jre\lib\ext\sunjce_provider.jar;E:\software\java\JDK8\jre\lib\ext\sunmscapi.jar;E:\software\java\JDK8\jre\lib\ext\sunpkcs11.jar;E:\software\java\JDK8\jre\lib\ext\zipfs.jar;E:\software\java\JDK8\jre\lib\javaws.jar;E:\software\java\JDK8\jre\lib\jce.jar;E:\software\java\JDK8\jre\lib\jfr.jar;E:\software\java\JDK8\jre\lib\jfxswt.jar;E:\software\java\JDK8\jre\lib\jsse.jar;E:\software\java\JDK8\jre\lib\management-agent.jar;E:\software\java\JDK8\jre\lib\plugin.jar;E:\software\java\JDK8\jre\lib\resources.jar;E:\software\java\JDK8\jre\lib\rt.jar;E:\ideaSpace\springboot\springboot-web-helloworld\boot-dubbo-hello-service\target\classes;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\io\dubbo\springboot\spring-boot-starter-dubbo\1.0.0\spring-boot-starter-dubbo-1.0.0.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\org\springframework\boot\spring-boot-starter\2.1.8.RELEASE\spring-boot-starter-2.1.8.RELEASE.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\org\springframework\boot\spring-boot\2.1.8.RELEASE\spring-boot-2.1.8.RELEASE.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\org\springframework\spring-context\5.1.9.RELEASE\spring-context-5.1.9.RELEASE.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\org\springframework\spring-aop\5.1.9.RELEASE\spring-aop-5.1.9.RELEASE.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\org\springframework\spring-beans\5.1.9.RELEASE\spring-beans-5.1.9.RELEASE.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\org\springframework\spring-expression\5.1.9.RELEASE\spring-expression-5.1.9.RELEASE.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\org\springframework\boot\spring-boot-autoconfigure\2.1.8.RELEASE\spring-boot-autoconfigure-2.1.8.RELEASE.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\org\springframework\boot\spring-boot-starter-logging\2.1.8.RELEASE\spring-boot-starter-logging-2.1.8.RELEASE.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\ch\qos\logback\logback-classic\1.2.3\logback-classic-1.2.3.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\ch\qos\logback\logback-core\1.2.3\logback-core-1.2.3.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\org\apache\logging\log4j\log4j-to-slf4j\2.11.2\log4j-to-slf4j-2.11.2.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\org\apache\logging\log4j\log4j-api\2.11.2\log4j-api-2.11.2.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\org\slf4j\jul-to-slf4j\1.7.28\jul-to-slf4j-1.7.28.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\javax\annotation\javax.annotation-api\1.3.2\javax.annotation-api-1.3.2.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\org\yaml\snakeyaml\1.23\snakeyaml-1.23.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\com\alibaba\dubbo\2.5.3\dubbo-2.5.3.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\org\javassist\javassist\3.15.0-GA\javassist-3.15.0-GA.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\org\jboss\netty\netty\3.2.5.Final\netty-3.2.5.Final.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\com\101tec\zkclient\0.7\zkclient-0.7.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\org\slf4j\slf4j-api\1.7.28\slf4j-api-1.7.28.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\org\slf4j\slf4j-log4j12\1.7.28\slf4j-log4j12-1.7.28.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\log4j\log4j\1.2.15\log4j-1.2.15.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\javax\mail\mail\1.4\mail-1.4.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\javax\activation\activation\1.1\activation-1.1.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\org\apache\zookeeper\zookeeper\3.4.6\zookeeper-3.4.6.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\jline\jline\0.9.94\jline-0.9.94.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\io\netty\netty\3.7.0.Final\netty-3.7.0.Final.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\junit\junit\4.12\junit-4.12.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\org\hamcrest\hamcrest-core\1.3\hamcrest-core-1.3.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\org\springframework\spring-core\5.1.9.RELEASE\spring-core-5.1.9.RELEASE.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\org\springframework\spring-jcl\5.1.9.RELEASE\spring-jcl-5.1.9.RELEASE.jar;E:\software\idea201803\lib\idea_rt.jar
2019-09-12 17:02:31.437  INFO 27532 --- [           main] org.apache.zookeeper.ZooKeeper           : Client environment:java.library.path=E:\software\java\JDK8\bin;C:\WINDOWS\Sun\Java\bin;C:\WINDOWS\system32;C:\WINDOWS;E:\SOFTWARE\ORACLE\PRODUCT\11.2.0\DBHOME_1\BIN;E:\software\Oracle\product\11.2.0\dbhome_1\bin;C:\MinGW\bin;C:\WINDOWS\SYSTEM32;C:\WINDOWS;C:\WINDOWS\SYSTEM32\WBEM;C:\WINDOWS\SYSTEM32\WINDOWSPOWERSHELL\V1.0\;E:\SOFTWARE\SVN\BIN;C:\PROGRAM FILES (X86)\NVIDIA CORPORATION\PHYSX\COMMON;E:\software\java\JDK8\BIN;E:\software\java\JDK8\JRE\BIN;E:\SOFTWARE\MYSQL\BIN;E:\software\java\apache-maven-3.3.9\BIN;E:\SOFTWARE\NODE\;E:\SOFTWARE\GIT\CMD;E:\SOFTWARE\TORTOISEGIT\BIN;C:\WINDOWS\SYSTEM32;C:\WINDOWS;C:\WINDOWS\SYSTEM32\WBEM;C:\WINDOWS\SYSTEM32\WINDOWSPOWERSHELL\V1.0\;C:\Program Files\WIDCOMM\Bluetooth Software\;C:\Program Files\WIDCOMM\Bluetooth Software\syswow64;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;E:\software\Git\cmd;C:\WINDOWS\System32\OpenSSH\;C:\Users\dingsj\AppData\Roaming\npm;C:\Users\dingsj\AppData\Local\Microsoft\WindowsApps;C:\MinGW\bin;;E:\software\Microsoft VS Code\bin;.
2019-09-12 17:02:31.437  INFO 27532 --- [           main] org.apache.zookeeper.ZooKeeper           : Client environment:java.io.tmpdir=C:\Users\dingsj\AppData\Local\Temp\
2019-09-12 17:02:31.437  INFO 27532 --- [           main] org.apache.zookeeper.ZooKeeper           : Client environment:java.compiler=<NA>
2019-09-12 17:02:31.437  INFO 27532 --- [           main] org.apache.zookeeper.ZooKeeper           : Client environment:os.name=Windows 10
2019-09-12 17:02:31.438  INFO 27532 --- [           main] org.apache.zookeeper.ZooKeeper           : Client environment:os.arch=amd64
2019-09-12 17:02:31.438  INFO 27532 --- [           main] org.apache.zookeeper.ZooKeeper           : Client environment:os.version=10.0
2019-09-12 17:02:31.438  INFO 27532 --- [           main] org.apache.zookeeper.ZooKeeper           : Client environment:user.name=dingsj
2019-09-12 17:02:31.438  INFO 27532 --- [           main] org.apache.zookeeper.ZooKeeper           : Client environment:user.home=C:\Users\dingsj
2019-09-12 17:02:31.438  INFO 27532 --- [           main] org.apache.zookeeper.ZooKeeper           : Client environment:user.dir=E:\ideaSpace\springboot\springboot-web-helloworld
2019-09-12 17:02:31.440  INFO 27532 --- [           main] org.apache.zookeeper.ZooKeeper           : Initiating client connection, connectString=192.168.47.131:6666 sessionTimeout=30000 watcher=org.I0Itec.zkclient.ZkClient@7096b474
2019-09-12 17:02:31.529  INFO 27532 --- [68.47.131:6666)] org.apache.zookeeper.ClientCnxn          : Opening socket connection to server 192.168.47.131/192.168.47.131:6666. Will not attempt to authenticate using SASL (unknown error)
2019-09-12 17:02:31.532  INFO 27532 --- [68.47.131:6666)] org.apache.zookeeper.ClientCnxn          : Socket connection established to 192.168.47.131/192.168.47.131:6666, initiating session
2019-09-12 17:02:31.549  INFO 27532 --- [68.47.131:6666)] org.apache.zookeeper.ClientCnxn          : Session establishment complete on server 192.168.47.131/192.168.47.131:6666, sessionid = 0x16d22fbcd8d0004, negotiated timeout = 30000
2019-09-12 17:02:31.723  INFO 27532 --- [           main] c.e.h.BootDubboHelloServiceApplication   : Started BootDubboHelloServiceApplication in 3.154 seconds (JVM running for 5.07)

启动成功,去看看注册中心。
在这里插入图片描述
发现一条服务,对比我们自己的服务标识:

@Service(version = "1.0.0",group = "G_APP_DEMO",timeout = 1000,owner = "_xxx")
public class HelloServiceImpl implements IHelloService

明显就发现 组 和 版本信息就是我们自己配置 group 和 version 。到这里,服务已经成功发布出去了。现在对它进行些改造。

步骤四:改造项目

  1. 改造日志
    系统启动提示没有log4j 初始化配置
    在这里插入图片描述
    在resources/下添加一个 sl4j 配置文件 - log4j.properties
log4j.rootLogger=INFO,consoleAppender,logfile

log4j.appender.consoleAppender=org.apache.log4j.ConsoleAppender
log4j.appender.consoleAppender.layout=org.apache.log4j.PatternLayout
log4j.appender.consoleAppender.layout.ConversionPattern=%-d{HH:mm:ss,SSS} [%logger{30}]-[%p] %m%n

log4j.appender.logfile=org.apache.log4j.DailyRollingFileAppender
log4j.appender.logfile.File=/home/admin/demo/logs/demo.log
log4j.appender.logfile.Append = true
log4j.appender.logfile.DatePattern='.'yyyy-MM-dd
log4j.appender.logfile.layout=org.apache.log4j.PatternLayout
log4j.appender.logfile.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss,SSS} [%t] [%c] [%p] - %m%n
  1. 在实现类里面添加日志打印,编辑 HelloServiceImpl.java
package com.example.hello.service.impl;

import com.alibaba.dubbo.config.annotation.Service;
import com.example.hello.service.IHelloService;
import org.apache.log4j.Logger;
/**
 *  基础服务实现
 * @author xxx
 * */
@Service(version = "1.0.0",group = "G_APP_DEMO",timeout = 1000,owner = "_xxx")
public class HelloServiceImpl implements IHelloService {

    private static final Logger logger = Logger.getLogger(HelloServiceImpl.class);
    /**
     *  hello 接口
     * @param name 名称
     * @return 招呼语
     * */
    @Override
    public String sayHello(String name) {

        logger.info("Base Service:sayHello : " + name);

        return "Hello "+ name +", This is a simple dubbo service! ";
    }
}
  1. 改造服务为 xml 配置文件形式
    3.1 在resources/ 目录下添加 producer.xml :
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:dubbo="http://code.alibabatech.com/schema/dubbo"
       xsi:schemaLocation="http://www.springframework.org/schema/beans
    http://www.springframework.org/schema/beans/spring-beans.xsd
    http://code.alibabatech.com/schema/dubbo
    http://code.alibabatech.com/schema/dubbo/dubbo.xsd ">
    <!-- 消费方应用名,用于计算依赖关系,不是匹配条件,不要与提供方一样 -->


    <dubbo:application name="boot-dubbo-helloservice-provider" />
    <!-- 使用zookeeper作为注册中心 -->
    <dubbo:registry  protocol="zookeeper" address="zookeeper://192.168.47.131:6666" />
    <!-- 生成远程服务代理 -->
    <bean id="helloService" class="com.example.hello.service.impl.HelloServiceImpl"></bean>
    <dubbo:service interface="com.example.hello.service.IHelloService" ref="helloService" group="G_BASE_C" version="1.0.1"></dubbo:service>
</beans>

这里更改了 group=“G_BASE_C” version=“1.0.1” 信息
3.2 更改主类添加 @ImportResource(“classpath:producer.xml”) 注解:

package com.example.hello;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.ImportResource;

@ImportResource("classpath:producer.xml")
@SpringBootApplication
public class BootDubboHelloServiceApplication {

    public static void main(String[] args) {
        SpringApplication.run(BootDubboHelloServiceApplication.class, args);
    }

}

3.3 去掉 resources/ 目录中application.properties内关于 dubbo 的配置信息:

server.port=9090

### Dubbo 基础配置
#spring.dubbo.application.name=springboot-dubbo-provider
#spring.dubbo.registry.address=zookeeper://192.168.47.131
#spring.dubbo.registry.port=6666
#spring.dubbo.protocol.name=dubbo
#spring.dubbo.protocol.port=20880
#spring.dubbo.scan=com.example.hello.service.impl

3.4 去掉 HelloServiceImpl.java 中的 @Service 注解:

package com.example.hello.service.impl;

import com.alibaba.dubbo.config.annotation.Service;
import com.example.hello.service.IHelloService;
import org.apache.log4j.Logger;
/**
 *  基础服务实现
 * @author xxx
 * */
//@Service(version = "1.0.0",group = "G_APP_DEMO",timeout = 1000,owner = "_xxx")
public class HelloServiceImpl implements IHelloService {

    private static final Logger logger = Logger.getLogger(HelloServiceImpl.class);
    /**
     *  hello 接口
     * @param name 名称
     * @return 招呼语
     * */
    @Override
    public String sayHello(String name) {

        logger.info("Base Service:sayHello : " + name);

        return "Hello "+ name +", This is a simple dubbo service! ";
    }
}

3.5 重启项目

E:\software\java\JDK8\bin\java.exe -XX:TieredStopAtLevel=1 -noverify -Dspring.output.ansi.enabled=always -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=49268 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -Djava.rmi.server.hostname=localhost -Dspring.liveBeansView.mbeanDomain -Dspring.application.admin.enabled=true -javaagent:E:\software\idea201803\lib\idea_rt.jar=49269:E:\software\idea201803\bin -Dfile.encoding=UTF-8 -classpath E:\software\java\JDK8\jre\lib\charsets.jar;E:\software\java\JDK8\jre\lib\deploy.jar;E:\software\java\JDK8\jre\lib\ext\access-bridge-64.jar;E:\software\java\JDK8\jre\lib\ext\cldrdata.jar;E:\software\java\JDK8\jre\lib\ext\dnsns.jar;E:\software\java\JDK8\jre\lib\ext\jaccess.jar;E:\software\java\JDK8\jre\lib\ext\jfxrt.jar;E:\software\java\JDK8\jre\lib\ext\localedata.jar;E:\software\java\JDK8\jre\lib\ext\nashorn.jar;E:\software\java\JDK8\jre\lib\ext\sunec.jar;E:\software\java\JDK8\jre\lib\ext\sunjce_provider.jar;E:\software\java\JDK8\jre\lib\ext\sunmscapi.jar;E:\software\java\JDK8\jre\lib\ext\sunpkcs11.jar;E:\software\java\JDK8\jre\lib\ext\zipfs.jar;E:\software\java\JDK8\jre\lib\javaws.jar;E:\software\java\JDK8\jre\lib\jce.jar;E:\software\java\JDK8\jre\lib\jfr.jar;E:\software\java\JDK8\jre\lib\jfxswt.jar;E:\software\java\JDK8\jre\lib\jsse.jar;E:\software\java\JDK8\jre\lib\management-agent.jar;E:\software\java\JDK8\jre\lib\plugin.jar;E:\software\java\JDK8\jre\lib\resources.jar;E:\software\java\JDK8\jre\lib\rt.jar;E:\ideaSpace\springboot\springboot-web-helloworld\boot-dubbo-hello-service\target\classes;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\io\dubbo\springboot\spring-boot-starter-dubbo\1.0.0\spring-boot-starter-dubbo-1.0.0.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\org\springframework\boot\spring-boot-starter\2.1.8.RELEASE\spring-boot-starter-2.1.8.RELEASE.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\org\springframework\boot\spring-boot\2.1.8.RELEASE\spring-boot-2.1.8.RELEASE.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\org\springframework\spring-context\5.1.9.RELEASE\spring-context-5.1.9.RELEASE.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\org\springframework\spring-aop\5.1.9.RELEASE\spring-aop-5.1.9.RELEASE.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\org\springframework\spring-beans\5.1.9.RELEASE\spring-beans-5.1.9.RELEASE.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\org\springframework\spring-expression\5.1.9.RELEASE\spring-expression-5.1.9.RELEASE.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\org\springframework\boot\spring-boot-autoconfigure\2.1.8.RELEASE\spring-boot-autoconfigure-2.1.8.RELEASE.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\org\springframework\boot\spring-boot-starter-logging\2.1.8.RELEASE\spring-boot-starter-logging-2.1.8.RELEASE.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\ch\qos\logback\logback-classic\1.2.3\logback-classic-1.2.3.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\ch\qos\logback\logback-core\1.2.3\logback-core-1.2.3.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\org\apache\logging\log4j\log4j-to-slf4j\2.11.2\log4j-to-slf4j-2.11.2.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\org\apache\logging\log4j\log4j-api\2.11.2\log4j-api-2.11.2.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\org\slf4j\jul-to-slf4j\1.7.28\jul-to-slf4j-1.7.28.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\javax\annotation\javax.annotation-api\1.3.2\javax.annotation-api-1.3.2.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\org\yaml\snakeyaml\1.23\snakeyaml-1.23.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\com\alibaba\dubbo\2.5.3\dubbo-2.5.3.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\org\javassist\javassist\3.15.0-GA\javassist-3.15.0-GA.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\org\jboss\netty\netty\3.2.5.Final\netty-3.2.5.Final.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\com\101tec\zkclient\0.7\zkclient-0.7.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\org\slf4j\slf4j-api\1.7.28\slf4j-api-1.7.28.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\org\slf4j\slf4j-log4j12\1.7.28\slf4j-log4j12-1.7.28.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\log4j\log4j\1.2.15\log4j-1.2.15.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\javax\mail\mail\1.4\mail-1.4.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\javax\activation\activation\1.1\activation-1.1.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\org\apache\zookeeper\zookeeper\3.4.6\zookeeper-3.4.6.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\jline\jline\0.9.94\jline-0.9.94.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\io\netty\netty\3.7.0.Final\netty-3.7.0.Final.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\junit\junit\4.12\junit-4.12.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\org\hamcrest\hamcrest-core\1.3\hamcrest-core-1.3.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\org\springframework\spring-core\5.1.9.RELEASE\spring-core-5.1.9.RELEASE.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\org\springframework\spring-jcl\5.1.9.RELEASE\spring-jcl-5.1.9.RELEASE.jar com.example.hello.BootDubboHelloServiceApplication
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/E:/software/java/apache-maven-3.3.9/LIB-DOWNLOADS/ch/qos/logback/logback-classic/1.2.3/logback-classic-1.2.3.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/E:/software/java/apache-maven-3.3.9/LIB-DOWNLOADS/org/slf4j/slf4j-log4j12/1.7.28/slf4j-log4j12-1.7.28.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [ch.qos.logback.classic.util.ContextSelectorStaticBinder]

  .   ____          _            __ _ _
 /\\ / ___'_ __ _ _(_)_ __  __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
 \\/  ___)| |_)| | | | | || (_| |  ) ) ) )
  '  |____| .__|_| |_|_| |_\__, | / / / /
 =========|_|==============|___/=/_/_/_/
 :: Spring Boot ::        (v2.1.8.RELEASE)

2019-09-12 17:36:53.062  INFO 29976 --- [           main] c.e.h.BootDubboHelloServiceApplication   : Starting BootDubboHelloServiceApplication on DESKTOP-EAEE93N with PID 29976 (E:\ideaSpace\springboot\springboot-web-helloworld\boot-dubbo-hello-service\target\classes started by dingsj in E:\ideaSpace\springboot\springboot-web-helloworld)
2019-09-12 17:36:53.069  INFO 29976 --- [           main] c.e.h.BootDubboHelloServiceApplication   : No active profile set, falling back to default profiles: default
Dubbo-Holder
17:36:54,558 [ogger{30}]-[INFO] using logger: com.alibaba.dubbo.common.logger.log4j.Log4jLoggerAdapter
17:36:55,314 [com.alibaba.dubbo.config.spring.ServiceBean.onApplicationEvent(ServiceBean.java:107)ogger{30}]-[INFO]  [DUBBO] The service ready on spring started. service: com.example.hello.service.IHelloService, dubbo version: 2.5.3, current host: 127.0.0.1
17:36:55,437 [com.alibaba.dubbo.config.ServiceConfig.exportLocal(ServiceConfig.java:510)ogger{30}]-[INFO]  [DUBBO] Export dubbo service com.example.hello.service.IHelloService to local registry, dubbo version: 2.5.3, current host: 127.0.0.1
17:36:55,438 [com.alibaba.dubbo.config.ServiceConfig.doExportUrlsFor1Protocol(ServiceConfig.java:470)ogger{30}]-[INFO]  [DUBBO] Export dubbo service com.example.hello.service.IHelloService to url dubbo://192.168.47.1:20880/com.example.hello.service.IHelloService?anyhost=true&application=boot-dubbo-helloservice-provider&dubbo=2.5.3&group=G_BASE_C&interface=com.example.hello.service.IHelloService&methods=sayHello&pid=29976&revision=1.0.1&side=provider&timestamp=1568281015339&version=1.0.1, dubbo version: 2.5.3, current host: 127.0.0.1
17:36:55,438 [com.alibaba.dubbo.config.ServiceConfig.doExportUrlsFor1Protocol(ServiceConfig.java:481)ogger{30}]-[INFO]  [DUBBO] Register dubbo service com.example.hello.service.IHelloService url dubbo://192.168.47.1:20880/com.example.hello.service.IHelloService?anyhost=true&application=boot-dubbo-helloservice-provider&dubbo=2.5.3&group=G_BASE_C&interface=com.example.hello.service.IHelloService&methods=sayHello&pid=29976&revision=1.0.1&side=provider&timestamp=1568281015339&version=1.0.1 to registry registry://192.168.47.131:6666/com.alibaba.dubbo.registry.RegistryService?application=boot-dubbo-helloservice-provider&dubbo=2.5.3&pid=29976&registry=zookeeper&timestamp=1568281015330, dubbo version: 2.5.3, current host: 127.0.0.1
17:36:55,658 [com.alibaba.dubbo.remoting.transport.AbstractServer.<init>(AbstractServer.java:69)ogger{30}]-[INFO]  [DUBBO] Start NettyServer bind /0.0.0.0:20880, export /192.168.47.1:20880, dubbo version: 2.5.3, current host: 127.0.0.1
17:36:55,688 [com.alibaba.dubbo.registry.support.AbstractRegistry.loadProperties(AbstractRegistry.java:232)ogger{30}]-[INFO]  [DUBBO] Load registry store file C:\Users\dingsj\.dubbo\dubbo-registry-192.168.47.131.cache, data: {com.example.consumer.service.MyService:1.0.0=empty://192.168.47.1:20880/com.example.consumer.service.MyService?anyhost=true&application=springboot-dubbo-provider&category=configurators&check=false&dubbo=2.5.3&interface=com.example.consumer.service.MyService&methods=hello&owner=_ding&pid=24432&revision=1.0.0&side=provider&timeout=1000&timestamp=1568170569126&version=1.0.0, com.example.hello.service.IHelloService=empty://192.168.47.1:20880/com.example.hello.service.IHelloService?anyhost=true&application=boot-dubbo-helloservice-provider&category=configurators&check=false&dubbo=2.5.3&interface=com.example.hello.service.IHelloService&methods=sayHello&pid=17412&side=provider&timestamp=1568280887300, G_APP_DEMO/com.example.consumer.service.MyService:1.0.0=empty://192.168.47.1:20880/com.example.consumer.service.MyService?anyhost=true&application=springboot-dubbo-provider&category=configurators&check=false&dubbo=2.5.3&group=G_APP_DEMO&interface=com.example.consumer.service.MyService&methods=hello&owner=_ding&pid=20344&revision=1.0.0&side=provider&timeout=1000&timestamp=1568190333231&version=1.0.0, com.example.pro.springbootservice.service.MyService=empty://192.168.47.1/com.example.pro.springbootservice.service.MyService?application=dubbo-consumer&category=configurators&dubbo=2.5.3&interface=com.example.pro.springbootservice.service.MyService&methods=hello1,hello,bye&pid=24008&side=consumer&timestamp=1568104057826 empty://192.168.47.1/com.example.pro.springbootservice.service.MyService?application=dubbo-consumer&category=routers&dubbo=2.5.3&interface=com.example.pro.springbootservice.service.MyService&methods=hello1,hello,bye&pid=24008&side=consumer&timestamp=1568104057826 empty://192.168.47.1/com.example.pro.springbootservice.service.MyService?application=dubbo-consumer&category=providers&dubbo=2.5.3&interface=com.example.pro.springbootservice.service.MyService&methods=hello1,hello,bye&pid=24008&side=consumer&timestamp=1568104057826, G_APP_DEMO/com.example.hello.service.IHelloService:1.0.0=empty://192.168.47.1:20880/com.example.hello.service.IHelloService?anyhost=true&application=springboot-dubbo-provider&category=configurators&check=false&dubbo=2.5.3&group=G_APP_DEMO&interface=com.example.hello.service.IHelloService&methods=sayHello&owner=_xxx&pid=27532&revision=1.0.0&side=provider&timeout=1000&timestamp=1568278951137&version=1.0.0}, dubbo version: 2.5.3, current host: 127.0.0.1
17:36:55,702 [org.I0Itec.zkclient.ZkEventThread.run(ZkEventThread.java:64)ogger{30}]-[INFO] Starting ZkClient event thread.
2019-09-12 17:36:55.708  INFO 29976 --- [           main] org.apache.zookeeper.ZooKeeper           : Client environment:zookeeper.version=3.4.6-1569965, built on 02/20/2014 09:09 GMT
2019-09-12 17:36:55.709  INFO 29976 --- [           main] org.apache.zookeeper.ZooKeeper           : Client environment:host.name=DESKTOP-EAEE93N
2019-09-12 17:36:55.709  INFO 29976 --- [           main] org.apache.zookeeper.ZooKeeper           : Client environment:java.version=1.8.0_112
2019-09-12 17:36:55.709  INFO 29976 --- [           main] org.apache.zookeeper.ZooKeeper           : Client environment:java.vendor=Oracle Corporation
2019-09-12 17:36:55.709  INFO 29976 --- [           main] org.apache.zookeeper.ZooKeeper           : Client environment:java.home=E:\software\java\JDK8\jre
2019-09-12 17:36:55.709  INFO 29976 --- [           main] org.apache.zookeeper.ZooKeeper           : Client environment:java.class.path=E:\software\java\JDK8\jre\lib\charsets.jar;E:\software\java\JDK8\jre\lib\deploy.jar;E:\software\java\JDK8\jre\lib\ext\access-bridge-64.jar;E:\software\java\JDK8\jre\lib\ext\cldrdata.jar;E:\software\java\JDK8\jre\lib\ext\dnsns.jar;E:\software\java\JDK8\jre\lib\ext\jaccess.jar;E:\software\java\JDK8\jre\lib\ext\jfxrt.jar;E:\software\java\JDK8\jre\lib\ext\localedata.jar;E:\software\java\JDK8\jre\lib\ext\nashorn.jar;E:\software\java\JDK8\jre\lib\ext\sunec.jar;E:\software\java\JDK8\jre\lib\ext\sunjce_provider.jar;E:\software\java\JDK8\jre\lib\ext\sunmscapi.jar;E:\software\java\JDK8\jre\lib\ext\sunpkcs11.jar;E:\software\java\JDK8\jre\lib\ext\zipfs.jar;E:\software\java\JDK8\jre\lib\javaws.jar;E:\software\java\JDK8\jre\lib\jce.jar;E:\software\java\JDK8\jre\lib\jfr.jar;E:\software\java\JDK8\jre\lib\jfxswt.jar;E:\software\java\JDK8\jre\lib\jsse.jar;E:\software\java\JDK8\jre\lib\management-agent.jar;E:\software\java\JDK8\jre\lib\plugin.jar;E:\software\java\JDK8\jre\lib\resources.jar;E:\software\java\JDK8\jre\lib\rt.jar;E:\ideaSpace\springboot\springboot-web-helloworld\boot-dubbo-hello-service\target\classes;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\io\dubbo\springboot\spring-boot-starter-dubbo\1.0.0\spring-boot-starter-dubbo-1.0.0.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\org\springframework\boot\spring-boot-starter\2.1.8.RELEASE\spring-boot-starter-2.1.8.RELEASE.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\org\springframework\boot\spring-boot\2.1.8.RELEASE\spring-boot-2.1.8.RELEASE.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\org\springframework\spring-context\5.1.9.RELEASE\spring-context-5.1.9.RELEASE.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\org\springframework\spring-aop\5.1.9.RELEASE\spring-aop-5.1.9.RELEASE.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\org\springframework\spring-beans\5.1.9.RELEASE\spring-beans-5.1.9.RELEASE.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\org\springframework\spring-expression\5.1.9.RELEASE\spring-expression-5.1.9.RELEASE.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\org\springframework\boot\spring-boot-autoconfigure\2.1.8.RELEASE\spring-boot-autoconfigure-2.1.8.RELEASE.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\org\springframework\boot\spring-boot-starter-logging\2.1.8.RELEASE\spring-boot-starter-logging-2.1.8.RELEASE.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\ch\qos\logback\logback-classic\1.2.3\logback-classic-1.2.3.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\ch\qos\logback\logback-core\1.2.3\logback-core-1.2.3.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\org\apache\logging\log4j\log4j-to-slf4j\2.11.2\log4j-to-slf4j-2.11.2.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\org\apache\logging\log4j\log4j-api\2.11.2\log4j-api-2.11.2.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\org\slf4j\jul-to-slf4j\1.7.28\jul-to-slf4j-1.7.28.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\javax\annotation\javax.annotation-api\1.3.2\javax.annotation-api-1.3.2.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\org\yaml\snakeyaml\1.23\snakeyaml-1.23.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\com\alibaba\dubbo\2.5.3\dubbo-2.5.3.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\org\javassist\javassist\3.15.0-GA\javassist-3.15.0-GA.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\org\jboss\netty\netty\3.2.5.Final\netty-3.2.5.Final.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\com\101tec\zkclient\0.7\zkclient-0.7.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\org\slf4j\slf4j-api\1.7.28\slf4j-api-1.7.28.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\org\slf4j\slf4j-log4j12\1.7.28\slf4j-log4j12-1.7.28.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\log4j\log4j\1.2.15\log4j-1.2.15.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\javax\mail\mail\1.4\mail-1.4.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\javax\activation\activation\1.1\activation-1.1.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\org\apache\zookeeper\zookeeper\3.4.6\zookeeper-3.4.6.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\jline\jline\0.9.94\jline-0.9.94.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\io\netty\netty\3.7.0.Final\netty-3.7.0.Final.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\junit\junit\4.12\junit-4.12.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\org\hamcrest\hamcrest-core\1.3\hamcrest-core-1.3.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\org\springframework\spring-core\5.1.9.RELEASE\spring-core-5.1.9.RELEASE.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\org\springframework\spring-jcl\5.1.9.RELEASE\spring-jcl-5.1.9.RELEASE.jar;E:\software\idea201803\lib\idea_rt.jar
2019-09-12 17:36:55.710  INFO 29976 --- [           main] org.apache.zookeeper.ZooKeeper           : Client environment:java.library.path=E:\software\java\JDK8\bin;C:\WINDOWS\Sun\Java\bin;C:\WINDOWS\system32;C:\WINDOWS;E:\SOFTWARE\ORACLE\PRODUCT\11.2.0\DBHOME_1\BIN;E:\software\Oracle\product\11.2.0\dbhome_1\bin;C:\MinGW\bin;C:\WINDOWS\SYSTEM32;C:\WINDOWS;C:\WINDOWS\SYSTEM32\WBEM;C:\WINDOWS\SYSTEM32\WINDOWSPOWERSHELL\V1.0\;E:\SOFTWARE\SVN\BIN;C:\PROGRAM FILES (X86)\NVIDIA CORPORATION\PHYSX\COMMON;E:\software\java\JDK8\BIN;E:\software\java\JDK8\JRE\BIN;E:\SOFTWARE\MYSQL\BIN;E:\software\java\apache-maven-3.3.9\BIN;E:\SOFTWARE\NODE\;E:\SOFTWARE\GIT\CMD;E:\SOFTWARE\TORTOISEGIT\BIN;C:\WINDOWS\SYSTEM32;C:\WINDOWS;C:\WINDOWS\SYSTEM32\WBEM;C:\WINDOWS\SYSTEM32\WINDOWSPOWERSHELL\V1.0\;C:\Program Files\WIDCOMM\Bluetooth Software\;C:\Program Files\WIDCOMM\Bluetooth Software\syswow64;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;E:\software\Git\cmd;C:\WINDOWS\System32\OpenSSH\;C:\Users\dingsj\AppData\Roaming\npm;C:\Users\dingsj\AppData\Local\Microsoft\WindowsApps;C:\MinGW\bin;;E:\software\Microsoft VS Code\bin;.
2019-09-12 17:36:55.710  INFO 29976 --- [           main] org.apache.zookeeper.ZooKeeper           : Client environment:java.io.tmpdir=C:\Users\dingsj\AppData\Local\Temp\
2019-09-12 17:36:55.710  INFO 29976 --- [           main] org.apache.zookeeper.ZooKeeper           : Client environment:java.compiler=<NA>
2019-09-12 17:36:55.710  INFO 29976 --- [           main] org.apache.zookeeper.ZooKeeper           : Client environment:os.name=Windows 10
2019-09-12 17:36:55.710  INFO 29976 --- [           main] org.apache.zookeeper.ZooKeeper           : Client environment:os.arch=amd64
2019-09-12 17:36:55.710  INFO 29976 --- [           main] org.apache.zookeeper.ZooKeeper           : Client environment:os.version=10.0
2019-09-12 17:36:55.710  INFO 29976 --- [           main] org.apache.zookeeper.ZooKeeper           : Client environment:user.name=dingsj
2019-09-12 17:36:55.711  INFO 29976 --- [           main] org.apache.zookeeper.ZooKeeper           : Client environment:user.home=C:\Users\dingsj
2019-09-12 17:36:55.711  INFO 29976 --- [           main] org.apache.zookeeper.ZooKeeper           : Client environment:user.dir=E:\ideaSpace\springboot\springboot-web-helloworld
2019-09-12 17:36:55.712  INFO 29976 --- [           main] org.apache.zookeeper.ZooKeeper           : Initiating client connection, connectString=192.168.47.131:6666 sessionTimeout=30000 watcher=org.I0Itec.zkclient.ZkClient@3382f8ae
17:36:55,727 [org.I0Itec.zkclient.ZkClient.waitForKeeperState(ZkClient.java:934)ogger{30}]-[INFO] Waiting for keeper state SyncConnected
2019-09-12 17:36:55.732  INFO 29976 --- [68.47.131:6666)] org.apache.zookeeper.ClientCnxn          : Opening socket connection to server 192.168.47.131/192.168.47.131:6666. Will not attempt to authenticate using SASL (unknown error)
2019-09-12 17:36:55.735  INFO 29976 --- [68.47.131:6666)] org.apache.zookeeper.ClientCnxn          : Socket connection established to 192.168.47.131/192.168.47.131:6666, initiating session
2019-09-12 17:36:55.750  INFO 29976 --- [68.47.131:6666)] org.apache.zookeeper.ClientCnxn          : Session establishment complete on server 192.168.47.131/192.168.47.131:6666, sessionid = 0x16d22fbcd8d0008, negotiated timeout = 30000
17:36:55,753 [org.I0Itec.zkclient.ZkClient.processStateChanged(ZkClient.java:711)ogger{30}]-[INFO] zookeeper state changed (SyncConnected)
17:36:55,756 [com.alibaba.dubbo.registry.support.AbstractRegistry.register(AbstractRegistry.java:302)ogger{30}]-[INFO]  [DUBBO] Register: dubbo://192.168.47.1:20880/com.example.hello.service.IHelloService?anyhost=true&application=boot-dubbo-helloservice-provider&dubbo=2.5.3&group=G_BASE_C&interface=com.example.hello.service.IHelloService&methods=sayHello&pid=29976&revision=1.0.1&side=provider&timestamp=1568281015339&version=1.0.1, dubbo version: 2.5.3, current host: 127.0.0.1
17:36:55,794 [com.alibaba.dubbo.registry.support.AbstractRegistry.subscribe(AbstractRegistry.java:325)ogger{30}]-[INFO]  [DUBBO] Subscribe: provider://192.168.47.1:20880/com.example.hello.service.IHelloService?anyhost=true&application=boot-dubbo-helloservice-provider&category=configurators&check=false&dubbo=2.5.3&group=G_BASE_C&interface=com.example.hello.service.IHelloService&methods=sayHello&pid=29976&revision=1.0.1&side=provider&timestamp=1568281015339&version=1.0.1, dubbo version: 2.5.3, current host: 127.0.0.1
17:36:55,822 [com.alibaba.dubbo.registry.support.AbstractRegistry.notify(AbstractRegistry.java:422)ogger{30}]-[INFO]  [DUBBO] Notify urls for subscribe url provider://192.168.47.1:20880/com.example.hello.service.IHelloService?anyhost=true&application=boot-dubbo-helloservice-provider&category=configurators&check=false&dubbo=2.5.3&group=G_BASE_C&interface=com.example.hello.service.IHelloService&methods=sayHello&pid=29976&revision=1.0.1&side=provider&timestamp=1568281015339&version=1.0.1, urls: [empty://192.168.47.1:20880/com.example.hello.service.IHelloService?anyhost=true&application=boot-dubbo-helloservice-provider&category=configurators&check=false&dubbo=2.5.3&group=G_BASE_C&interface=com.example.hello.service.IHelloService&methods=sayHello&pid=29976&revision=1.0.1&side=provider&timestamp=1568281015339&version=1.0.1], dubbo version: 2.5.3, current host: 127.0.0.1
2019-09-12 17:36:55.869  INFO 29976 --- [           main] c.e.h.BootDubboHelloServiceApplication   : Started BootDubboHelloServiceApplication in 3.556 seconds (JVM running for 5.229)

发现日志风格已改变,去看看服务注册中心:
在这里插入图片描述
到这里,已经实现了 注解 和 xml 两种方式的发布 dubbo服务。

  1. 主类 声明 @EnableDubbo 实现其自动扫描dubbo服务
    4.1 改造pom依赖
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <parent>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-parent</artifactId>
        <version>2.1.8.RELEASE</version>
        <relativePath/> <!-- lookup parent from repository -->
    </parent>
    <groupId>com.example.hello</groupId>
    <artifactId>boot-dubbo-hello-service</artifactId>
    <version>0.0.1-SNAPSHOT</version>
    <name>boot-dubbo-hello-service</name>
    <description>Demo project for Spring Boot</description>

    <properties>
        <java.version>1.8</java.version>
    </properties>

    <dependencies>

        <!-- Dubbo 依賴 -->
        <dependency>
            <groupId>com.alibaba</groupId>
            <artifactId>dubbo</artifactId>
            <version>2.6.1</version>
        </dependency>
        <dependency>
            <groupId>com.alibaba.spring.boot</groupId>
            <artifactId>dubbo-spring-boot-starter</artifactId>
            <version>2.0.0</version>
            <exclusions>
                <exclusion>
                    <groupId>com.alibaba</groupId>
                    <artifactId>dubbo</artifactId>
                </exclusion>
            </exclusions>
        </dependency>

        <dependency>
            <groupId>com.alibaba</groupId>
            <artifactId>dubbo-registry-zookeeper</artifactId>
            <version>2.6.1</version>
            <exclusions>
                <exclusion>
                    <groupId>commons-logging</groupId>
                    <artifactId>commons-logging</artifactId>
                </exclusion>
                <exclusion>
                    <artifactId>slf4j-log4j12</artifactId>
                    <groupId>org.slf4j</groupId>
                </exclusion>
            </exclusions>
        </dependency>

        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-test</artifactId>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
            </plugin>
        </plugins>
    </build>

</project>

4.2 改造主类 BootDubboHelloServiceApplication.java :

package com.example.hello;

import com.alibaba.dubbo.config.spring.context.annotation.EnableDubbo;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.ImportResource;

@EnableDubbo(scanBasePackages = "com.example.hello.service.impl")
@SpringBootApplication
public class BootDubboHelloServiceApplication {

    public static void main(String[] args) {
        SpringApplication.run(BootDubboHelloServiceApplication.class, args);
    }

}

4.3 改造 HelloServiceImpl.java :

package com.example.hello.service.impl;

import com.alibaba.dubbo.config.annotation.Service;
import com.example.hello.service.IHelloService;
import org.apache.log4j.Logger;
/**
 *  基础服务实现
 * @author xxx
 * */
@Service(version = "1.0.0",group = "G_APP_DEMO",timeout = 1000,owner = "_xxx")
public class HelloServiceImpl implements IHelloService {

    private static final Logger logger = Logger.getLogger(HelloServiceImpl.class);
    /**
     *  hello 接口
     * @param name 名称
     * @return 招呼语
     * */
    @Override
    public String sayHello(String name) {

        logger.info("Base Service:sayHello : " + name);

        return "Hello "+ name +", This is a simple dubbo service! ";
    }
}

4.4 修改配置文件 application.properties:

server.port=9090

dubbo.application.name=springboot-dubbo-provider
dubbo.registry.address=zookeeper://192.168.47.131
dubbo.registry.port=6666
dubbo.protocol.name=dubbo
dubbo.protocol.port=20880

4.5 重启项目:

E:\software\java\JDK8\bin\java.exe -XX:TieredStopAtLevel=1 -noverify -Dspring.output.ansi.enabled=always -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=50605 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -Djava.rmi.server.hostname=localhost -Dspring.liveBeansView.mbeanDomain -Dspring.application.admin.enabled=true -javaagent:E:\software\idea201803\lib\idea_rt.jar=50606:E:\software\idea201803\bin -Dfile.encoding=UTF-8 -classpath E:\software\java\JDK8\jre\lib\charsets.jar;E:\software\java\JDK8\jre\lib\deploy.jar;E:\software\java\JDK8\jre\lib\ext\access-bridge-64.jar;E:\software\java\JDK8\jre\lib\ext\cldrdata.jar;E:\software\java\JDK8\jre\lib\ext\dnsns.jar;E:\software\java\JDK8\jre\lib\ext\jaccess.jar;E:\software\java\JDK8\jre\lib\ext\jfxrt.jar;E:\software\java\JDK8\jre\lib\ext\localedata.jar;E:\software\java\JDK8\jre\lib\ext\nashorn.jar;E:\software\java\JDK8\jre\lib\ext\sunec.jar;E:\software\java\JDK8\jre\lib\ext\sunjce_provider.jar;E:\software\java\JDK8\jre\lib\ext\sunmscapi.jar;E:\software\java\JDK8\jre\lib\ext\sunpkcs11.jar;E:\software\java\JDK8\jre\lib\ext\zipfs.jar;E:\software\java\JDK8\jre\lib\javaws.jar;E:\software\java\JDK8\jre\lib\jce.jar;E:\software\java\JDK8\jre\lib\jfr.jar;E:\software\java\JDK8\jre\lib\jfxswt.jar;E:\software\java\JDK8\jre\lib\jsse.jar;E:\software\java\JDK8\jre\lib\management-agent.jar;E:\software\java\JDK8\jre\lib\plugin.jar;E:\software\java\JDK8\jre\lib\resources.jar;E:\software\java\JDK8\jre\lib\rt.jar;E:\ideaSpace\springboot\springboot-web-helloworld\boot-dubbo-hello-service\target\classes;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\com\alibaba\dubbo\2.6.1\dubbo-2.6.1.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\org\springframework\spring-context\5.1.9.RELEASE\spring-context-5.1.9.RELEASE.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\org\springframework\spring-aop\5.1.9.RELEASE\spring-aop-5.1.9.RELEASE.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\org\springframework\spring-beans\5.1.9.RELEASE\spring-beans-5.1.9.RELEASE.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\org\springframework\spring-expression\5.1.9.RELEASE\spring-expression-5.1.9.RELEASE.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\org\javassist\javassist\3.20.0-GA\javassist-3.20.0-GA.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\org\jboss\netty\netty\3.2.5.Final\netty-3.2.5.Final.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\com\alibaba\spring\boot\dubbo-spring-boot-starter\2.0.0\dubbo-spring-boot-starter-2.0.0.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\org\springframework\boot\spring-boot-starter-actuator\2.1.8.RELEASE\spring-boot-starter-actuator-2.1.8.RELEASE.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\org\springframework\boot\spring-boot-actuator-autoconfigure\2.1.8.RELEASE\spring-boot-actuator-autoconfigure-2.1.8.RELEASE.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\org\springframework\boot\spring-boot-actuator\2.1.8.RELEASE\spring-boot-actuator-2.1.8.RELEASE.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\com\fasterxml\jackson\core\jackson-databind\2.9.9.3\jackson-databind-2.9.9.3.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\com\fasterxml\jackson\core\jackson-annotations\2.9.0\jackson-annotations-2.9.0.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\com\fasterxml\jackson\core\jackson-core\2.9.9\jackson-core-2.9.9.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\com\fasterxml\jackson\datatype\jackson-datatype-jsr310\2.9.9\jackson-datatype-jsr310-2.9.9.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\io\micrometer\micrometer-core\1.1.6\micrometer-core-1.1.6.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\org\hdrhistogram\HdrHistogram\2.1.9\HdrHistogram-2.1.9.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\org\latencyutils\LatencyUtils\2.0.3\LatencyUtils-2.0.3.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\com\alibaba\dubbo-registry-zookeeper\2.6.1\dubbo-registry-zookeeper-2.6.1.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\com\alibaba\dubbo-registry-api\2.6.1\dubbo-registry-api-2.6.1.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\com\alibaba\dubbo-cluster\2.6.1\dubbo-cluster-2.6.1.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\com\alibaba\dubbo-rpc-api\2.6.1\dubbo-rpc-api-2.6.1.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\com\alibaba\dubbo-serialization-api\2.6.1\dubbo-serialization-api-2.6.1.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\com\alibaba\dubbo-container-api\2.6.1\dubbo-container-api-2.6.1.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\com\alibaba\dubbo-remoting-zookeeper\2.6.1\dubbo-remoting-zookeeper-2.6.1.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\com\alibaba\dubbo-common\2.6.1\dubbo-common-2.6.1.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\log4j\log4j\1.2.16\log4j-1.2.16.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\com\alibaba\hessian-lite\3.2.2\hessian-lite-3.2.2.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\com\alibaba\fastjson\1.2.46\fastjson-1.2.46.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\com\esotericsoftware\kryo\4.0.1\kryo-4.0.1.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\com\esotericsoftware\reflectasm\1.11.3\reflectasm-1.11.3.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\com\esotericsoftware\minlog\1.3.0\minlog-1.3.0.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\de\javakaffee\kryo-serializers\0.42\kryo-serializers-0.42.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\de\ruedigermoeller\fst\2.48-jdk-6\fst-2.48-jdk-6.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\com\cedarsoftware\java-util\1.9.0\java-util-1.9.0.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\com\cedarsoftware\json-io\2.5.1\json-io-2.5.1.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\org\apache\zookeeper\zookeeper\3.4.9\zookeeper-3.4.9.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\jline\jline\0.9.94\jline-0.9.94.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\io\netty\netty\3.10.5.Final\netty-3.10.5.Final.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\com\101tec\zkclient\0.2\zkclient-0.2.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\org\apache\curator\curator-framework\2.12.0\curator-framework-2.12.0.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\org\apache\curator\curator-client\2.12.0\curator-client-2.12.0.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\com\google\guava\guava\16.0.1\guava-16.0.1.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\org\springframework\boot\spring-boot-starter\2.1.8.RELEASE\spring-boot-starter-2.1.8.RELEASE.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\org\springframework\boot\spring-boot\2.1.8.RELEASE\spring-boot-2.1.8.RELEASE.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\org\springframework\boot\spring-boot-autoconfigure\2.1.8.RELEASE\spring-boot-autoconfigure-2.1.8.RELEASE.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\org\springframework\boot\spring-boot-starter-logging\2.1.8.RELEASE\spring-boot-starter-logging-2.1.8.RELEASE.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\ch\qos\logback\logback-classic\1.2.3\logback-classic-1.2.3.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\ch\qos\logback\logback-core\1.2.3\logback-core-1.2.3.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\org\apache\logging\log4j\log4j-to-slf4j\2.11.2\log4j-to-slf4j-2.11.2.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\org\apache\logging\log4j\log4j-api\2.11.2\log4j-api-2.11.2.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\org\slf4j\jul-to-slf4j\1.7.28\jul-to-slf4j-1.7.28.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\javax\annotation\javax.annotation-api\1.3.2\javax.annotation-api-1.3.2.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\org\yaml\snakeyaml\1.23\snakeyaml-1.23.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\org\ow2\asm\asm\5.0.4\asm-5.0.4.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\org\slf4j\slf4j-api\1.7.28\slf4j-api-1.7.28.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\org\objenesis\objenesis\2.6\objenesis-2.6.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\org\springframework\spring-core\5.1.9.RELEASE\spring-core-5.1.9.RELEASE.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\org\springframework\spring-jcl\5.1.9.RELEASE\spring-jcl-5.1.9.RELEASE.jar com.example.hello.BootDubboHelloServiceApplication
18:19:40,191 [ogger{30}]-[INFO] using logger: com.alibaba.dubbo.common.logger.log4j.Log4jLoggerAdapter
18:19:40,205 [com.alibaba.dubbo.common.Version.checkDuplicate(Version.java:132)ogger{30}]-[ERROR]  [DUBBO] Duplicate class com/alibaba/dubbo/common/Version.class in 2 jar [file:/E:/software/java/apache-maven-3.3.9/LIB-DOWNLOADS/com/alibaba/dubbo-common/2.6.1/dubbo-common-2.6.1.jar!/com/alibaba/dubbo/common/Version.class, file:/E:/software/java/apache-maven-3.3.9/LIB-DOWNLOADS/com/alibaba/dubbo/2.6.1/dubbo-2.6.1.jar!/com/alibaba/dubbo/common/Version.class], dubbo version: 2.6.1, current host: 192.168.47.1

  ████████▄  ███    █▄  ▀█████████▄  ▀█████████▄   ▄██████▄  
  ███   ▀███ ███    ███   ███    ███   ███    ███ ███    ███ 
  ███    ███ ███    ███   ███    ███   ███    ███ ███    ███ 
  ███    ███ ███    ███  ▄███▄▄▄██▀   ▄███▄▄▄██▀  ███    ███ 
  ███    ███ ███    ███ ▀▀███▀▀▀██▄  ▀▀███▀▀▀██▄  ███    ███ 
  ███    ███ ███    ███   ███    ██▄   ███    ██▄ ███    ███ 
  ███   ▄███ ███    ███   ███    ███   ███    ███ ███    ███ 
  ████████▀  ████████▀  ▄█████████▀  ▄█████████▀   ▀██████▀  
                                                             

 :: Dubbo ::        (v2.6.1)

  .   ____          _            __ _ _
 /\\ / ___'_ __ _ _(_)_ __  __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
 \\/  ___)| |_)| | | | | || (_| |  ) ) ) )
  '  |____| .__|_| |_|_| |_\__, | / / / /
 =========|_|==============|___/=/_/_/_/
 :: Spring Boot ::        (v2.1.8.RELEASE)

2019-09-12 18:19:40.593  INFO 25848 --- [           main] c.e.h.BootDubboHelloServiceApplication   : Starting BootDubboHelloServiceApplication on DESKTOP-EAEE93N with PID 25848 (E:\ideaSpace\springboot\springboot-web-helloworld\boot-dubbo-hello-service\target\classes started by dingsj in E:\ideaSpace\springboot\springboot-web-helloworld)
2019-09-12 18:19:40.599  INFO 25848 --- [           main] c.e.h.BootDubboHelloServiceApplication   : No active profile set, falling back to default profiles: default
2019-09-12 18:19:42.173  INFO 25848 --- [           main] .a.d.c.s.c.a.DubboConfigBindingRegistrar : The dubbo config bean definition [name : com.alibaba.dubbo.config.ApplicationConfig#0, class : com.alibaba.dubbo.config.ApplicationConfig] has been registered.
2019-09-12 18:19:42.178  INFO 25848 --- [           main] .a.d.c.s.c.a.DubboConfigBindingRegistrar : The BeanPostProcessor bean definition [com.alibaba.dubbo.config.spring.beans.factory.annotation.DubboConfigBindingBeanPostProcessor] for dubbo config bean [name : com.alibaba.dubbo.config.ApplicationConfig#0] has been registered.
2019-09-12 18:19:42.179  INFO 25848 --- [           main] .a.d.c.s.c.a.DubboConfigBindingRegistrar : The dubbo config bean definition [name : com.alibaba.dubbo.config.RegistryConfig#0, class : com.alibaba.dubbo.config.RegistryConfig] has been registered.
2019-09-12 18:19:42.180  INFO 25848 --- [           main] .a.d.c.s.c.a.DubboConfigBindingRegistrar : The BeanPostProcessor bean definition [com.alibaba.dubbo.config.spring.beans.factory.annotation.DubboConfigBindingBeanPostProcessor] for dubbo config bean [name : com.alibaba.dubbo.config.RegistryConfig#0] has been registered.
2019-09-12 18:19:42.180  INFO 25848 --- [           main] .a.d.c.s.c.a.DubboConfigBindingRegistrar : The dubbo config bean definition [name : com.alibaba.dubbo.config.ProtocolConfig#0, class : com.alibaba.dubbo.config.ProtocolConfig] has been registered.
2019-09-12 18:19:42.180  INFO 25848 --- [           main] .a.d.c.s.c.a.DubboConfigBindingRegistrar : The BeanPostProcessor bean definition [com.alibaba.dubbo.config.spring.beans.factory.annotation.DubboConfigBindingBeanPostProcessor] for dubbo config bean [name : com.alibaba.dubbo.config.ProtocolConfig#0] has been registered.
18:19:42,620 [com.alibaba.dubbo.config.spring.beans.factory.annotation.ServiceAnnotationBeanPostProcessor.resolveBeanNameGenerator(ServiceAnnotationBeanPostProcessor.java:187)ogger{30}]-[INFO]  [DUBBO] BeanNameGenerator bean can't be found in BeanFactory with name [org.springframework.context.annotation.internalConfigurationBeanNameGenerator], dubbo version: 2.6.1, current host: 192.168.47.1
18:19:42,620 [com.alibaba.dubbo.config.spring.beans.factory.annotation.ServiceAnnotationBeanPostProcessor.resolveBeanNameGenerator(ServiceAnnotationBeanPostProcessor.java:189)ogger{30}]-[INFO]  [DUBBO] BeanNameGenerator will be a instance of org.springframework.context.annotation.AnnotationBeanNameGenerator , it maybe a potential problem on bean name generation., dubbo version: 2.6.1, current host: 192.168.47.1
18:19:42,630 [com.alibaba.dubbo.config.spring.beans.factory.annotation.ServiceAnnotationBeanPostProcessor.registerServiceBean(ServiceAnnotationBeanPostProcessor.java:262)ogger{30}]-[WARN]  [DUBBO] The BeanDefinition[Root bean: class [com.alibaba.dubbo.config.spring.ServiceBean]; scope=; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null] of ServiceBean has been registered with name : ServiceBean@com.example.hello.service.IHelloService#helloServiceImpl, dubbo version: 2.6.1, current host: 192.168.47.1
18:19:42,630 [com.alibaba.dubbo.config.spring.beans.factory.annotation.ServiceAnnotationBeanPostProcessor.registerServiceBeans(ServiceAnnotationBeanPostProcessor.java:144)ogger{30}]-[INFO]  [DUBBO] 1 annotated Dubbo's @Service Components { [Bean definition with name 'helloServiceImpl': Generic bean: class [com.example.hello.service.impl.HelloServiceImpl]; scope=; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null; defined in file [E:\ideaSpace\springboot\springboot-web-helloworld\boot-dubbo-hello-service\target\classes\com\example\hello\service\impl\HelloServiceImpl.class]] } were scanned under package[com.example.hello.service.impl], dubbo version: 2.6.1, current host: 192.168.47.1
2019-09-12 18:19:42.890  INFO 25848 --- [           main] .f.a.DubboConfigBindingBeanPostProcessor : The properties of bean [name : com.alibaba.dubbo.config.ApplicationConfig#0] have been binding by values : [bean property 'name']
2019-09-12 18:19:42.901  INFO 25848 --- [           main] .f.a.DubboConfigBindingBeanPostProcessor : The properties of bean [name : com.alibaba.dubbo.config.RegistryConfig#0] have been binding by values : [bean property 'address', bean property 'port']
2019-09-12 18:19:42.911  INFO 25848 --- [           main] .f.a.DubboConfigBindingBeanPostProcessor : The properties of bean [name : com.alibaba.dubbo.config.ProtocolConfig#0] have been binding by values : [bean property 'name', bean property 'port']
18:19:44,126 [com.alibaba.dubbo.config.spring.ServiceBean.onApplicationEvent(ServiceBean.java:119)ogger{30}]-[INFO]  [DUBBO] The service ready on spring started. service: com.example.hello.service.IHelloService, dubbo version: 2.6.1, current host: 192.168.47.1
18:19:44,255 [com.alibaba.dubbo.config.ServiceConfig.exportLocal(ServiceConfig.java:531)ogger{30}]-[INFO]  [DUBBO] Export dubbo service com.example.hello.service.IHelloService to local registry, dubbo version: 2.6.1, current host: 192.168.47.1
18:19:44,256 [com.alibaba.dubbo.config.ServiceConfig.doExportUrlsFor1Protocol(ServiceConfig.java:490)ogger{30}]-[INFO]  [DUBBO] Export dubbo service com.example.hello.service.IHelloService to url dubbo://192.168.47.1:20880/com.example.hello.service.IHelloService?anyhost=true&application=springboot-dubbo-provider&bind.ip=192.168.47.1&bind.port=20880&dubbo=2.6.1&generic=false&group=G_APP_DEMO&interface=com.example.hello.service.IHelloService&methods=sayHello&owner=_xxx&pid=25848&revision=1.0.0&side=provider&timeout=1000&timestamp=1568283584144&version=1.0.0, dubbo version: 2.6.1, current host: 192.168.47.1
18:19:44,256 [com.alibaba.dubbo.config.ServiceConfig.doExportUrlsFor1Protocol(ServiceConfig.java:500)ogger{30}]-[INFO]  [DUBBO] Register dubbo service com.example.hello.service.IHelloService url dubbo://192.168.47.1:20880/com.example.hello.service.IHelloService?anyhost=true&application=springboot-dubbo-provider&bind.ip=192.168.47.1&bind.port=20880&dubbo=2.6.1&generic=false&group=G_APP_DEMO&interface=com.example.hello.service.IHelloService&methods=sayHello&owner=_xxx&pid=25848&revision=1.0.0&side=provider&timeout=1000&timestamp=1568283584144&version=1.0.0 to registry registry://192.168.47.131:6666/com.alibaba.dubbo.registry.RegistryService?application=springboot-dubbo-provider&dubbo=2.6.1&pid=25848&registry=zookeeper&timestamp=1568283584137, dubbo version: 2.6.1, current host: 192.168.47.1
18:19:44,428 [com.alibaba.dubbo.remoting.transport.AbstractServer.<init>(AbstractServer.java:65)ogger{30}]-[INFO]  [DUBBO] Start NettyServer bind /0.0.0.0:20880, export /192.168.47.1:20880, dubbo version: 2.6.1, current host: 192.168.47.1
18:19:44,443 [com.alibaba.dubbo.registry.support.AbstractRegistry.loadProperties(AbstractRegistry.java:199)ogger{30}]-[INFO]  [DUBBO] Load registry store file C:\Users\dingsj\.dubbo\dubbo-registry-springboot-dubbo-provider-192.168.47.131:6666.cache, data: {G_APP_DEMO/com.example.hello.service.IHelloService:1.0.0=empty://192.168.47.1:20880/com.example.hello.service.IHelloService?anyhost=true&application=springboot-dubbo-provider&category=configurators&check=false&dubbo=2.6.1&generic=false&group=G_APP_DEMO&interface=com.example.hello.service.IHelloService&methods=sayHello&owner=_xxx&pid=13144&revision=1.0.0&side=provider&timeout=1000&timestamp=1568283438173&version=1.0.0}, dubbo version: 2.6.1, current host: 192.168.47.1
2019-09-12 18:19:44.509  INFO 25848 --- [           main] o.a.c.f.imps.CuratorFrameworkImpl        : Starting
2019-09-12 18:19:44.515  INFO 25848 --- [           main] org.apache.zookeeper.ZooKeeper           : Client environment:zookeeper.version=3.4.9-1757313, built on 08/23/2016 06:50 GMT
2019-09-12 18:19:44.515  INFO 25848 --- [           main] org.apache.zookeeper.ZooKeeper           : Client environment:host.name=DESKTOP-EAEE93N
2019-09-12 18:19:44.515  INFO 25848 --- [           main] org.apache.zookeeper.ZooKeeper           : Client environment:java.version=1.8.0_112
2019-09-12 18:19:44.515  INFO 25848 --- [           main] org.apache.zookeeper.ZooKeeper           : Client environment:java.vendor=Oracle Corporation
2019-09-12 18:19:44.515  INFO 25848 --- [           main] org.apache.zookeeper.ZooKeeper           : Client environment:java.home=E:\software\java\JDK8\jre
2019-09-12 18:19:44.515  INFO 25848 --- [           main] org.apache.zookeeper.ZooKeeper           : Client environment:java.class.path=E:\software\java\JDK8\jre\lib\charsets.jar;E:\software\java\JDK8\jre\lib\deploy.jar;E:\software\java\JDK8\jre\lib\ext\access-bridge-64.jar;E:\software\java\JDK8\jre\lib\ext\cldrdata.jar;E:\software\java\JDK8\jre\lib\ext\dnsns.jar;E:\software\java\JDK8\jre\lib\ext\jaccess.jar;E:\software\java\JDK8\jre\lib\ext\jfxrt.jar;E:\software\java\JDK8\jre\lib\ext\localedata.jar;E:\software\java\JDK8\jre\lib\ext\nashorn.jar;E:\software\java\JDK8\jre\lib\ext\sunec.jar;E:\software\java\JDK8\jre\lib\ext\sunjce_provider.jar;E:\software\java\JDK8\jre\lib\ext\sunmscapi.jar;E:\software\java\JDK8\jre\lib\ext\sunpkcs11.jar;E:\software\java\JDK8\jre\lib\ext\zipfs.jar;E:\software\java\JDK8\jre\lib\javaws.jar;E:\software\java\JDK8\jre\lib\jce.jar;E:\software\java\JDK8\jre\lib\jfr.jar;E:\software\java\JDK8\jre\lib\jfxswt.jar;E:\software\java\JDK8\jre\lib\jsse.jar;E:\software\java\JDK8\jre\lib\management-agent.jar;E:\software\java\JDK8\jre\lib\plugin.jar;E:\software\java\JDK8\jre\lib\resources.jar;E:\software\java\JDK8\jre\lib\rt.jar;E:\ideaSpace\springboot\springboot-web-helloworld\boot-dubbo-hello-service\target\classes;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\com\alibaba\dubbo\2.6.1\dubbo-2.6.1.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\org\springframework\spring-context\5.1.9.RELEASE\spring-context-5.1.9.RELEASE.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\org\springframework\spring-aop\5.1.9.RELEASE\spring-aop-5.1.9.RELEASE.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\org\springframework\spring-beans\5.1.9.RELEASE\spring-beans-5.1.9.RELEASE.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\org\springframework\spring-expression\5.1.9.RELEASE\spring-expression-5.1.9.RELEASE.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\org\javassist\javassist\3.20.0-GA\javassist-3.20.0-GA.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\org\jboss\netty\netty\3.2.5.Final\netty-3.2.5.Final.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\com\alibaba\spring\boot\dubbo-spring-boot-starter\2.0.0\dubbo-spring-boot-starter-2.0.0.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\org\springframework\boot\spring-boot-starter-actuator\2.1.8.RELEASE\spring-boot-starter-actuator-2.1.8.RELEASE.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\org\springframework\boot\spring-boot-actuator-autoconfigure\2.1.8.RELEASE\spring-boot-actuator-autoconfigure-2.1.8.RELEASE.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\org\springframework\boot\spring-boot-actuator\2.1.8.RELEASE\spring-boot-actuator-2.1.8.RELEASE.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\com\fasterxml\jackson\core\jackson-databind\2.9.9.3\jackson-databind-2.9.9.3.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\com\fasterxml\jackson\core\jackson-annotations\2.9.0\jackson-annotations-2.9.0.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\com\fasterxml\jackson\core\jackson-core\2.9.9\jackson-core-2.9.9.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\com\fasterxml\jackson\datatype\jackson-datatype-jsr310\2.9.9\jackson-datatype-jsr310-2.9.9.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\io\micrometer\micrometer-core\1.1.6\micrometer-core-1.1.6.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\org\hdrhistogram\HdrHistogram\2.1.9\HdrHistogram-2.1.9.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\org\latencyutils\LatencyUtils\2.0.3\LatencyUtils-2.0.3.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\com\alibaba\dubbo-registry-zookeeper\2.6.1\dubbo-registry-zookeeper-2.6.1.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\com\alibaba\dubbo-registry-api\2.6.1\dubbo-registry-api-2.6.1.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\com\alibaba\dubbo-cluster\2.6.1\dubbo-cluster-2.6.1.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\com\alibaba\dubbo-rpc-api\2.6.1\dubbo-rpc-api-2.6.1.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\com\alibaba\dubbo-serialization-api\2.6.1\dubbo-serialization-api-2.6.1.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\com\alibaba\dubbo-container-api\2.6.1\dubbo-container-api-2.6.1.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\com\alibaba\dubbo-remoting-zookeeper\2.6.1\dubbo-remoting-zookeeper-2.6.1.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\com\alibaba\dubbo-common\2.6.1\dubbo-common-2.6.1.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\log4j\log4j\1.2.16\log4j-1.2.16.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\com\alibaba\hessian-lite\3.2.2\hessian-lite-3.2.2.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\com\alibaba\fastjson\1.2.46\fastjson-1.2.46.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\com\esotericsoftware\kryo\4.0.1\kryo-4.0.1.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\com\esotericsoftware\reflectasm\1.11.3\reflectasm-1.11.3.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\com\esotericsoftware\minlog\1.3.0\minlog-1.3.0.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\de\javakaffee\kryo-serializers\0.42\kryo-serializers-0.42.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\de\ruedigermoeller\fst\2.48-jdk-6\fst-2.48-jdk-6.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\com\cedarsoftware\java-util\1.9.0\java-util-1.9.0.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\com\cedarsoftware\json-io\2.5.1\json-io-2.5.1.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\org\apache\zookeeper\zookeeper\3.4.9\zookeeper-3.4.9.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\jline\jline\0.9.94\jline-0.9.94.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\io\netty\netty\3.10.5.Final\netty-3.10.5.Final.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\com\101tec\zkclient\0.2\zkclient-0.2.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\org\apache\curator\curator-framework\2.12.0\curator-framework-2.12.0.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\org\apache\curator\curator-client\2.12.0\curator-client-2.12.0.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\com\google\guava\guava\16.0.1\guava-16.0.1.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\org\springframework\boot\spring-boot-starter\2.1.8.RELEASE\spring-boot-starter-2.1.8.RELEASE.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\org\springframework\boot\spring-boot\2.1.8.RELEASE\spring-boot-2.1.8.RELEASE.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\org\springframework\boot\spring-boot-autoconfigure\2.1.8.RELEASE\spring-boot-autoconfigure-2.1.8.RELEASE.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\org\springframework\boot\spring-boot-starter-logging\2.1.8.RELEASE\spring-boot-starter-logging-2.1.8.RELEASE.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\ch\qos\logback\logback-classic\1.2.3\logback-classic-1.2.3.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\ch\qos\logback\logback-core\1.2.3\logback-core-1.2.3.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\org\apache\logging\log4j\log4j-to-slf4j\2.11.2\log4j-to-slf4j-2.11.2.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\org\apache\logging\log4j\log4j-api\2.11.2\log4j-api-2.11.2.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\org\slf4j\jul-to-slf4j\1.7.28\jul-to-slf4j-1.7.28.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\javax\annotation\javax.annotation-api\1.3.2\javax.annotation-api-1.3.2.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\org\yaml\snakeyaml\1.23\snakeyaml-1.23.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\org\ow2\asm\asm\5.0.4\asm-5.0.4.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\org\slf4j\slf4j-api\1.7.28\slf4j-api-1.7.28.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\org\objenesis\objenesis\2.6\objenesis-2.6.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\org\springframework\spring-core\5.1.9.RELEASE\spring-core-5.1.9.RELEASE.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\org\springframework\spring-jcl\5.1.9.RELEASE\spring-jcl-5.1.9.RELEASE.jar;E:\software\idea201803\lib\idea_rt.jar
2019-09-12 18:19:44.516  INFO 25848 --- [           main] org.apache.zookeeper.ZooKeeper           : Client environment:java.library.path=E:\software\java\JDK8\bin;C:\WINDOWS\Sun\Java\bin;C:\WINDOWS\system32;C:\WINDOWS;E:\SOFTWARE\ORACLE\PRODUCT\11.2.0\DBHOME_1\BIN;E:\software\Oracle\product\11.2.0\dbhome_1\bin;C:\MinGW\bin;C:\WINDOWS\SYSTEM32;C:\WINDOWS;C:\WINDOWS\SYSTEM32\WBEM;C:\WINDOWS\SYSTEM32\WINDOWSPOWERSHELL\V1.0\;E:\SOFTWARE\SVN\BIN;C:\PROGRAM FILES (X86)\NVIDIA CORPORATION\PHYSX\COMMON;E:\software\java\JDK8\BIN;E:\software\java\JDK8\JRE\BIN;E:\SOFTWARE\MYSQL\BIN;E:\software\java\apache-maven-3.3.9\BIN;E:\SOFTWARE\NODE\;E:\SOFTWARE\GIT\CMD;E:\SOFTWARE\TORTOISEGIT\BIN;C:\WINDOWS\SYSTEM32;C:\WINDOWS;C:\WINDOWS\SYSTEM32\WBEM;C:\WINDOWS\SYSTEM32\WINDOWSPOWERSHELL\V1.0\;C:\Program Files\WIDCOMM\Bluetooth Software\;C:\Program Files\WIDCOMM\Bluetooth Software\syswow64;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;E:\software\Git\cmd;C:\WINDOWS\System32\OpenSSH\;C:\Users\dingsj\AppData\Roaming\npm;C:\Users\dingsj\AppData\Local\Microsoft\WindowsApps;C:\MinGW\bin;;E:\software\Microsoft VS Code\bin;.
2019-09-12 18:19:44.516  INFO 25848 --- [           main] org.apache.zookeeper.ZooKeeper           : Client environment:java.io.tmpdir=C:\Users\dingsj\AppData\Local\Temp\
2019-09-12 18:19:44.516  INFO 25848 --- [           main] org.apache.zookeeper.ZooKeeper           : Client environment:java.compiler=<NA>
2019-09-12 18:19:44.516  INFO 25848 --- [           main] org.apache.zookeeper.ZooKeeper           : Client environment:os.name=Windows 10
2019-09-12 18:19:44.516  INFO 25848 --- [           main] org.apache.zookeeper.ZooKeeper           : Client environment:os.arch=amd64
2019-09-12 18:19:44.516  INFO 25848 --- [           main] org.apache.zookeeper.ZooKeeper           : Client environment:os.version=10.0
2019-09-12 18:19:44.516  INFO 25848 --- [           main] org.apache.zookeeper.ZooKeeper           : Client environment:user.name=dingsj
2019-09-12 18:19:44.516  INFO 25848 --- [           main] org.apache.zookeeper.ZooKeeper           : Client environment:user.home=C:\Users\dingsj
2019-09-12 18:19:44.516  INFO 25848 --- [           main] org.apache.zookeeper.ZooKeeper           : Client environment:user.dir=E:\ideaSpace\springboot\springboot-web-helloworld
2019-09-12 18:19:44.519  INFO 25848 --- [           main] org.apache.zookeeper.ZooKeeper           : Initiating client connection, connectString=192.168.47.131:6666 sessionTimeout=60000 watcher=org.apache.curator.ConnectionState@cda0432
2019-09-12 18:19:44.575  INFO 25848 --- [68.47.131:6666)] org.apache.zookeeper.ClientCnxn          : Opening socket connection to server 192.168.47.131/192.168.47.131:6666. Will not attempt to authenticate using SASL (unknown error)
2019-09-12 18:19:44.578  INFO 25848 --- [68.47.131:6666)] org.apache.zookeeper.ClientCnxn          : Socket connection established to 192.168.47.131/192.168.47.131:6666, initiating session
18:19:44,580 [com.alibaba.dubbo.registry.support.AbstractRegistry.register(AbstractRegistry.java:269)ogger{30}]-[INFO]  [DUBBO] Register: dubbo://192.168.47.1:20880/com.example.hello.service.IHelloService?anyhost=true&application=springboot-dubbo-provider&dubbo=2.6.1&generic=false&group=G_APP_DEMO&interface=com.example.hello.service.IHelloService&methods=sayHello&owner=_xxx&pid=25848&revision=1.0.0&side=provider&timeout=1000&timestamp=1568283584144&version=1.0.0, dubbo version: 2.6.1, current host: 192.168.47.1
2019-09-12 18:19:44.594  INFO 25848 --- [68.47.131:6666)] org.apache.zookeeper.ClientCnxn          : Session establishment complete on server 192.168.47.131/192.168.47.131:6666, sessionid = 0x16d22fbcd8d000b, negotiated timeout = 40000
2019-09-12 18:19:44.605  INFO 25848 --- [ain-EventThread] o.a.c.f.state.ConnectionStateManager     : State change: CONNECTED
18:19:44,631 [com.alibaba.dubbo.registry.support.AbstractRegistry.subscribe(AbstractRegistry.java:292)ogger{30}]-[INFO]  [DUBBO] Subscribe: provider://192.168.47.1:20880/com.example.hello.service.IHelloService?anyhost=true&application=springboot-dubbo-provider&category=configurators&check=false&dubbo=2.6.1&generic=false&group=G_APP_DEMO&interface=com.example.hello.service.IHelloService&methods=sayHello&owner=_xxx&pid=25848&revision=1.0.0&side=provider&timeout=1000&timestamp=1568283584144&version=1.0.0, dubbo version: 2.6.1, current host: 192.168.47.1
18:19:44,651 [com.alibaba.dubbo.registry.support.AbstractRegistry.notify(AbstractRegistry.java:380)ogger{30}]-[INFO]  [DUBBO] Notify urls for subscribe url provider://192.168.47.1:20880/com.example.hello.service.IHelloService?anyhost=true&application=springboot-dubbo-provider&category=configurators&check=false&dubbo=2.6.1&generic=false&group=G_APP_DEMO&interface=com.example.hello.service.IHelloService&methods=sayHello&owner=_xxx&pid=25848&revision=1.0.0&side=provider&timeout=1000&timestamp=1568283584144&version=1.0.0, urls: [empty://192.168.47.1:20880/com.example.hello.service.IHelloService?anyhost=true&application=springboot-dubbo-provider&category=configurators&check=false&dubbo=2.6.1&generic=false&group=G_APP_DEMO&interface=com.example.hello.service.IHelloService&methods=sayHello&owner=_xxx&pid=25848&revision=1.0.0&side=provider&timeout=1000&timestamp=1568283584144&version=1.0.0], dubbo version: 2.6.1, current host: 192.168.47.1
2019-09-12 18:19:44.695  INFO 25848 --- [           main] c.e.h.BootDubboHelloServiceApplication   : Started BootDubboHelloServiceApplication in 5.025 seconds (JVM running for 6.82)
18:19:44,700 [com.alibaba.dubbo.config.AbstractConfig$1.run(AbstractConfig.java:80)ogger{30}]-[INFO]  [DUBBO] Run shutdown hook now., dubbo version: 2.6.1, current host: 192.168.47.1
18:19:44,702 [com.alibaba.dubbo.registry.support.AbstractRegistryFactory.destroyAll(AbstractRegistryFactory.java:64)ogger{30}]-[INFO]  [DUBBO] Close all registries [zookeeper://192.168.47.131:6666/com.alibaba.dubbo.registry.RegistryService?application=springboot-dubbo-provider&dubbo=2.6.1&interface=com.alibaba.dubbo.registry.RegistryService&pid=25848&timestamp=1568283584137], dubbo version: 2.6.1, current host: 192.168.47.1
18:19:44,703 [com.alibaba.dubbo.registry.support.AbstractRegistry.destroy(AbstractRegistry.java:443)ogger{30}]-[INFO]  [DUBBO] Destroy registry:zookeeper://192.168.47.131:6666/com.alibaba.dubbo.registry.RegistryService?application=springboot-dubbo-provider&dubbo=2.6.1&interface=com.alibaba.dubbo.registry.RegistryService&pid=25848&timestamp=1568283584137, dubbo version: 2.6.1, current host: 192.168.47.1
18:19:44,704 [com.alibaba.dubbo.registry.support.AbstractRegistry.unregister(AbstractRegistry.java:279)ogger{30}]-[INFO]  [DUBBO] Unregister: dubbo://192.168.47.1:20880/com.example.hello.service.IHelloService?anyhost=true&application=springboot-dubbo-provider&dubbo=2.6.1&generic=false&group=G_APP_DEMO&interface=com.example.hello.service.IHelloService&methods=sayHello&owner=_xxx&pid=25848&revision=1.0.0&side=provider&timeout=1000&timestamp=1568283584144&version=1.0.0, dubbo version: 2.6.1, current host: 192.168.47.1
2019-09-12 18:19:44.712  INFO 25848 --- [      Thread-12] f.a.ReferenceAnnotationBeanPostProcessor : class com.alibaba.dubbo.config.spring.beans.factory.annotation.ReferenceAnnotationBeanPostProcessor was destroying!
18:19:44,722 [com.alibaba.dubbo.registry.support.AbstractRegistry.destroy(AbstractRegistry.java:452)ogger{30}]-[INFO]  [DUBBO] Destroy unregister url dubbo://192.168.47.1:20880/com.example.hello.service.IHelloService?anyhost=true&application=springboot-dubbo-provider&dubbo=2.6.1&generic=false&group=G_APP_DEMO&interface=com.example.hello.service.IHelloService&methods=sayHello&owner=_xxx&pid=25848&revision=1.0.0&side=provider&timeout=1000&timestamp=1568283584144&version=1.0.0, dubbo version: 2.6.1, current host: 192.168.47.1
18:19:44,723 [com.alibaba.dubbo.registry.support.AbstractRegistry.unsubscribe(AbstractRegistry.java:310)ogger{30}]-[INFO]  [DUBBO] Unsubscribe: provider://192.168.47.1:20880/com.example.hello.service.IHelloService?anyhost=true&application=springboot-dubbo-provider&category=configurators&check=false&dubbo=2.6.1&generic=false&group=G_APP_DEMO&interface=com.example.hello.service.IHelloService&methods=sayHello&owner=_xxx&pid=25848&revision=1.0.0&side=provider&timeout=1000&timestamp=1568283584144&version=1.0.0, dubbo version: 2.6.1, current host: 192.168.47.1
18:19:44,728 [com.alibaba.dubbo.registry.support.AbstractRegistry.destroy(AbstractRegistry.java:468)ogger{30}]-[INFO]  [DUBBO] Destroy unsubscribe url provider://192.168.47.1:20880/com.example.hello.service.IHelloService?anyhost=true&application=springboot-dubbo-provider&category=configurators&check=false&dubbo=2.6.1&generic=false&group=G_APP_DEMO&interface=com.example.hello.service.IHelloService&methods=sayHello&owner=_xxx&pid=25848&revision=1.0.0&side=provider&timeout=1000&timestamp=1568283584144&version=1.0.0, dubbo version: 2.6.1, current host: 192.168.47.1
2019-09-12 18:19:44.730  INFO 25848 --- [tor-Framework-0] o.a.c.f.imps.CuratorFrameworkImpl        : backgroundOperationsLoop exiting
2019-09-12 18:19:44.741  INFO 25848 --- [bboShutdownHook] org.apache.zookeeper.ZooKeeper           : Session: 0x16d22fbcd8d000b closed
2019-09-12 18:19:44.742  INFO 25848 --- [ain-EventThread] org.apache.zookeeper.ClientCnxn          : EventThread shut down for session: 0x16d22fbcd8d000b
18:19:54,750 [com.alibaba.dubbo.rpc.protocol.dubbo.DubboProtocol.destroy(DubboProtocol.java:419)ogger{30}]-[INFO]  [DUBBO] Close dubbo server: /192.168.47.1:20880, dubbo version: 2.6.1, current host: 192.168.47.1
18:19:54,753 [com.alibaba.dubbo.remoting.transport.AbstractServer.close(AbstractServer.java:142)ogger{30}]-[INFO]  [DUBBO] Close NettyServer bind /0.0.0.0:20880, export /192.168.47.1:20880, dubbo version: 2.6.1, current host: 192.168.47.1
18:19:54,759 [com.alibaba.dubbo.rpc.protocol.AbstractProtocol.destroy(AbstractProtocol.java:75)ogger{30}]-[INFO]  [DUBBO] Unexport service: dubbo://192.168.47.1:20880/com.example.hello.service.IHelloService?anyhost=true&application=springboot-dubbo-provider&bind.ip=192.168.47.1&bind.port=20880&dubbo=2.6.1&generic=false&group=G_APP_DEMO&interface=com.example.hello.service.IHelloService&methods=sayHello&owner=_xxx&pid=25848&revision=1.0.0&side=provider&timeout=1000&timestamp=1568283584144&version=1.0.0, dubbo version: 2.6.1, current host: 192.168.47.1
18:19:54,760 [com.alibaba.dubbo.rpc.protocol.AbstractProtocol.destroy(AbstractProtocol.java:75)ogger{30}]-[INFO]  [DUBBO] Unexport service: injvm://127.0.0.1/com.example.hello.service.IHelloService?anyhost=true&application=springboot-dubbo-provider&bind.ip=192.168.47.1&bind.port=20880&dubbo=2.6.1&generic=false&group=G_APP_DEMO&interface=com.example.hello.service.IHelloService&methods=sayHello&owner=_xxx&pid=25848&revision=1.0.0&side=provider&timeout=1000&timestamp=1568283584144&version=1.0.0, dubbo version: 2.6.1, current host: 192.168.47.1

Process finished with exit code 0

发现程序启动后有停掉了,处理一下,两种方法:
1, 添加 spring-boot-starter-web 依赖包
2. 让主类不死掉,修改主类BootDubboHelloServiceApplication.java

package com.example.hello;

import com.alibaba.dubbo.config.spring.context.annotation.EnableDubbo;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.ImportResource;

import java.util.concurrent.CountDownLatch;

@EnableDubbo(scanBasePackages = "com.example.hello.service.impl")
@SpringBootApplication
public class BootDubboHelloServiceApplication {

    private static CountDownLatch countDownLatch = new CountDownLatch(1);
    public static void main(String[] args) throws InterruptedException {
        SpringApplication.run(BootDubboHelloServiceApplication.class, args).registerShutdownHook();
        countDownLatch.await();
    }

}

重启项目,服务正常。到这里,服务改造就先这样了。下面写服务消费者。

步骤五:创建消费者
1,创建springboot maven 项目如上面建立过程, 引入dubbo包
pom文件:

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <parent>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-parent</artifactId>
        <version>2.1.8.RELEASE</version>
        <relativePath/> <!-- lookup parent from repository -->
    </parent>
    <groupId>com.example.hello.consumer</groupId>
    <artifactId>boot-dubbo-hello-consumer</artifactId>
    <version>0.0.1-SNAPSHOT</version>
    <name>boot-dubbo-hello-consumer</name>
    <description>Demo project for Spring Boot</description>

    <properties>
        <java.version>1.8</java.version>
    </properties>
    <dependencies>

        <!-- Dubbo 依賴 -->
        <dependency>
            <groupId>com.alibaba</groupId>
            <artifactId>dubbo</artifactId>
            <version>2.6.1</version>
        </dependency>
        <dependency>
            <groupId>com.alibaba.spring.boot</groupId>
            <artifactId>dubbo-spring-boot-starter</artifactId>
            <version>2.0.0</version>
            <exclusions>
                <exclusion>
                    <groupId>com.alibaba</groupId>
                    <artifactId>dubbo</artifactId>
                </exclusion>
            </exclusions>
        </dependency>

        <dependency>
            <groupId>com.alibaba</groupId>
            <artifactId>dubbo-registry-zookeeper</artifactId>
            <version>2.6.1</version>
            <exclusions>
                <exclusion>
                    <groupId>log4j</groupId>
                    <artifactId>log4j</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.slf4j</groupId>
                    <artifactId>slf4j-log4j12</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>ch.qos.logback</groupId>
                    <artifactId>logback-classic</artifactId>
                </exclusion>
            </exclusions>
        </dependency>

        <dependency>
            <groupId>com.101tec</groupId>
            <artifactId>zkclient</artifactId>
            <version>0.7</version>
            <exclusions>
                <exclusion>
                    <groupId>log4j</groupId>
                    <artifactId>log4j</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.slf4j</groupId>
                    <artifactId>slf4j-log4j12</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>ch.qos.logback</groupId>
                    <artifactId>logback-classic</artifactId>
                </exclusion>
            </exclusions>
        </dependency>

        <!-- web -->
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-web</artifactId>
        </dependency>

        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-test</artifactId>
            <scope>test</scope>
        </dependency>
    </dependencies>


    <build>
        <plugins>
            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
            </plugin>
        </plugins>
    </build>

</project>

  1. 项目目录
    在这里插入图片描述注意:新建服务方的接口信息。如上红框内容所示。
  2. 项目代码
    启动类:
package com.example;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.ImportResource;

@ImportResource("classpath:consumer.xml")
@SpringBootApplication
public class BootDubboHelloConsumerApplication {

    public static void main(String[] args) {
        SpringApplication.run(BootDubboHelloConsumerApplication.class, args);
    }

}

Controller:

package com.example.controller;

import com.example.impl.ConsumerServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 消费者控制器
 * @author xxx
 * */
@RestController
public class ConsumerController {

    @Autowired
    ConsumerServiceImpl consumerService;

    @GetMapping("/hello")
    public String hello(){
        System.out.println("Consumer: Controller:hello .....");
        return consumerService.sayHi();
    }

}

Service: IHelloService

package com.example.hello.service;

/**
 * 测试基础服务
 * @author xxx
 * */
public interface IHelloService {

    /**
     *  简单接口
     * @param name 名称
     * @return 招呼语
     * */
    String sayHello(String name);
}

Service: ConsumerService

package com.example.service;

/**
 * 消费者
 * @author xxx
 * */
public interface ConsumerService {

    /**
     * 消费者接口
     * */
    String sayHi();
}

ServiceImpl:

package com.example.impl;

import com.alibaba.dubbo.config.annotation.Reference;
import com.example.hello.service.IHelloService;
import com.example.service.ConsumerService;

import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * 消费者服务实现类
 * @author xxx
 * */
@Service
public class ConsumerServiceImpl implements ConsumerService {

    @Reference
    private IHelloService helloService;

    /**
     * 简单消费接口
     * */
    @Override
    public String sayHi() {
        System.out.println("Consumer Service:  testHello...");
        return helloService.sayHello("Ding");
    }
}

application.properties:

server.port=9092

consumer.xml:

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:dubbo="http://code.alibabatech.com/schema/dubbo"
       xsi:schemaLocation="http://www.springframework.org/schema/beans
    http://www.springframework.org/schema/beans/spring-beans.xsd
    http://code.alibabatech.com/schema/dubbo
    http://code.alibabatech.com/schema/dubbo/dubbo.xsd ">
    <dubbo:annotation package="com.example.impl" />
    <dubbo:application name="dubbo-consumer"/>
    <dubbo:registry  protocol="zookeeper" port="20882" register="false" address="zookeeper://192.168.47.131:6666" />
</beans>
  1. 项目启动
Caused by: java.lang.IllegalStateException: Failed to check the status of the service com.example.hello.service.IHelloService. No provider available for the service com.example.hello.service.IHelloService from the url zookeeper://192.168.47.131:6666/com.alibaba.dubbo.registry.RegistryService?application=dubbo-consumer&dubbo=2.6.1&interface=com.example.hello.service.IHelloService&methods=sayHello&pid=57744&register.ip=192.168.47.1&side=consumer&timestamp=1568792159044 to the consumer 192.168.47.1 use dubbo version 2.6.1
	at com.alibaba.dubbo.config.ReferenceConfig.createProxy(ReferenceConfig.java:422) ~[dubbo-2.6.1.jar:2.6.1]
	at com.alibaba.dubbo.config.ReferenceConfig.init(ReferenceConfig.java:333) ~[dubbo-2.6.1.jar:2.6.1]
	at com.alibaba.dubbo.config.ReferenceConfig.get(ReferenceConfig.java:163) ~[dubbo-2.6.1.jar:2.6.1]
	at com.alibaba.dubbo.config.spring.ReferenceBean.getObject(ReferenceBean.java:65) ~[dubbo-2.6.1.jar:2.6.1]
	... 43 common frames omitted

看着提示是说找不到服务,去看看监控中心是有服务的
在这里插入图片描述
之后发现是缺失了服务组合版本信息,没有匹配到导致的错误,此时需要调用服务处声明服务详细信息,故修改服务调用出代码 ConsumerServiceImpl.java:

@Reference(version = "1.0.1",group = "G_APP_TEST")
    private IHelloService helloService;

重启项目


E:\software\java\JDK8\bin\java.exe -agentlib:jdwp=transport=dt_socket,address=127.0.0.1:52875,suspend=y,server=n -XX:TieredStopAtLevel=1 -noverify -Dspring.output.ansi.enabled=always -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=52874 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -Djava.rmi.server.hostname=localhost -Dspring.liveBeansView.mbeanDomain -Dspring.application.admin.enabled=true -javaagent:E:\software\idea201803\lib\rt\debugger-agent.jar -Dfile.encoding=UTF-8 -classpath E:\software\java\JDK8\jre\lib\charsets.jar;E:\software\java\JDK8\jre\lib\deploy.jar;E:\software\java\JDK8\jre\lib\ext\access-bridge-64.jar;E:\software\java\JDK8\jre\lib\ext\cldrdata.jar;E:\software\java\JDK8\jre\lib\ext\dnsns.jar;E:\software\java\JDK8\jre\lib\ext\jaccess.jar;E:\software\java\JDK8\jre\lib\ext\jfxrt.jar;E:\software\java\JDK8\jre\lib\ext\localedata.jar;E:\software\java\JDK8\jre\lib\ext\nashorn.jar;E:\software\java\JDK8\jre\lib\ext\sunec.jar;E:\software\java\JDK8\jre\lib\ext\sunjce_provider.jar;E:\software\java\JDK8\jre\lib\ext\sunmscapi.jar;E:\software\java\JDK8\jre\lib\ext\sunpkcs11.jar;E:\software\java\JDK8\jre\lib\ext\zipfs.jar;E:\software\java\JDK8\jre\lib\javaws.jar;E:\software\java\JDK8\jre\lib\jce.jar;E:\software\java\JDK8\jre\lib\jfr.jar;E:\software\java\JDK8\jre\lib\jfxswt.jar;E:\software\java\JDK8\jre\lib\jsse.jar;E:\software\java\JDK8\jre\lib\management-agent.jar;E:\software\java\JDK8\jre\lib\plugin.jar;E:\software\java\JDK8\jre\lib\resources.jar;E:\software\java\JDK8\jre\lib\rt.jar;E:\ideaSpace\springboot\springboot-web-helloworld\boot-dubbo-hello-consumer\target\classes;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\com\alibaba\dubbo\2.6.1\dubbo-2.6.1.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\org\springframework\spring-context\5.1.9.RELEASE\spring-context-5.1.9.RELEASE.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\org\springframework\spring-aop\5.1.9.RELEASE\spring-aop-5.1.9.RELEASE.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\org\springframework\spring-beans\5.1.9.RELEASE\spring-beans-5.1.9.RELEASE.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\org\springframework\spring-expression\5.1.9.RELEASE\spring-expression-5.1.9.RELEASE.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\org\javassist\javassist\3.20.0-GA\javassist-3.20.0-GA.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\org\jboss\netty\netty\3.2.5.Final\netty-3.2.5.Final.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\com\alibaba\spring\boot\dubbo-spring-boot-starter\2.0.0\dubbo-spring-boot-starter-2.0.0.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\org\springframework\boot\spring-boot-starter-actuator\2.1.8.RELEASE\spring-boot-starter-actuator-2.1.8.RELEASE.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\org\springframework\boot\spring-boot-actuator-autoconfigure\2.1.8.RELEASE\spring-boot-actuator-autoconfigure-2.1.8.RELEASE.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\org\springframework\boot\spring-boot-actuator\2.1.8.RELEASE\spring-boot-actuator-2.1.8.RELEASE.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\io\micrometer\micrometer-core\1.1.6\micrometer-core-1.1.6.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\org\hdrhistogram\HdrHistogram\2.1.9\HdrHistogram-2.1.9.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\org\latencyutils\LatencyUtils\2.0.3\LatencyUtils-2.0.3.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\com\alibaba\dubbo-registry-zookeeper\2.6.1\dubbo-registry-zookeeper-2.6.1.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\com\alibaba\dubbo-registry-api\2.6.1\dubbo-registry-api-2.6.1.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\com\alibaba\dubbo-cluster\2.6.1\dubbo-cluster-2.6.1.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\com\alibaba\dubbo-rpc-api\2.6.1\dubbo-rpc-api-2.6.1.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\com\alibaba\dubbo-serialization-api\2.6.1\dubbo-serialization-api-2.6.1.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\com\alibaba\dubbo-container-api\2.6.1\dubbo-container-api-2.6.1.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\com\alibaba\dubbo-remoting-zookeeper\2.6.1\dubbo-remoting-zookeeper-2.6.1.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\com\alibaba\dubbo-common\2.6.1\dubbo-common-2.6.1.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\commons-logging\commons-logging\1.2\commons-logging-1.2.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\com\alibaba\hessian-lite\3.2.2\hessian-lite-3.2.2.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\com\alibaba\fastjson\1.2.46\fastjson-1.2.46.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\com\esotericsoftware\kryo\4.0.1\kryo-4.0.1.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\com\esotericsoftware\reflectasm\1.11.3\reflectasm-1.11.3.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\com\esotericsoftware\minlog\1.3.0\minlog-1.3.0.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\de\javakaffee\kryo-serializers\0.42\kryo-serializers-0.42.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\de\ruedigermoeller\fst\2.48-jdk-6\fst-2.48-jdk-6.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\com\cedarsoftware\java-util\1.9.0\java-util-1.9.0.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\com\cedarsoftware\json-io\2.5.1\json-io-2.5.1.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\org\apache\curator\curator-framework\2.12.0\curator-framework-2.12.0.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\org\apache\curator\curator-client\2.12.0\curator-client-2.12.0.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\com\google\guava\guava\16.0.1\guava-16.0.1.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\com\101tec\zkclient\0.7\zkclient-0.7.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\org\slf4j\slf4j-api\1.7.28\slf4j-api-1.7.28.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\org\apache\zookeeper\zookeeper\3.4.6\zookeeper-3.4.6.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\jline\jline\0.9.94\jline-0.9.94.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\io\netty\netty\3.7.0.Final\netty-3.7.0.Final.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\org\springframework\boot\spring-boot-starter-web\2.1.8.RELEASE\spring-boot-starter-web-2.1.8.RELEASE.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\org\springframework\boot\spring-boot-starter\2.1.8.RELEASE\spring-boot-starter-2.1.8.RELEASE.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\org\springframework\boot\spring-boot\2.1.8.RELEASE\spring-boot-2.1.8.RELEASE.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\org\springframework\boot\spring-boot-autoconfigure\2.1.8.RELEASE\spring-boot-autoconfigure-2.1.8.RELEASE.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\org\springframework\boot\spring-boot-starter-logging\2.1.8.RELEASE\spring-boot-starter-logging-2.1.8.RELEASE.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\ch\qos\logback\logback-classic\1.2.3\logback-classic-1.2.3.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\ch\qos\logback\logback-core\1.2.3\logback-core-1.2.3.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\org\apache\logging\log4j\log4j-to-slf4j\2.11.2\log4j-to-slf4j-2.11.2.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\org\apache\logging\log4j\log4j-api\2.11.2\log4j-api-2.11.2.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\org\slf4j\jul-to-slf4j\1.7.28\jul-to-slf4j-1.7.28.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\javax\annotation\javax.annotation-api\1.3.2\javax.annotation-api-1.3.2.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\org\yaml\snakeyaml\1.23\snakeyaml-1.23.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\org\springframework\boot\spring-boot-starter-json\2.1.8.RELEASE\spring-boot-starter-json-2.1.8.RELEASE.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\com\fasterxml\jackson\core\jackson-databind\2.9.9.3\jackson-databind-2.9.9.3.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\com\fasterxml\jackson\core\jackson-annotations\2.9.0\jackson-annotations-2.9.0.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\com\fasterxml\jackson\core\jackson-core\2.9.9\jackson-core-2.9.9.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\com\fasterxml\jackson\datatype\jackson-datatype-jdk8\2.9.9\jackson-datatype-jdk8-2.9.9.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\com\fasterxml\jackson\datatype\jackson-datatype-jsr310\2.9.9\jackson-datatype-jsr310-2.9.9.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\com\fasterxml\jackson\module\jackson-module-parameter-names\2.9.9\jackson-module-parameter-names-2.9.9.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\org\springframework\boot\spring-boot-starter-tomcat\2.1.8.RELEASE\spring-boot-starter-tomcat-2.1.8.RELEASE.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\org\apache\tomcat\embed\tomcat-embed-core\9.0.24\tomcat-embed-core-9.0.24.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\org\apache\tomcat\embed\tomcat-embed-el\9.0.24\tomcat-embed-el-9.0.24.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\org\apache\tomcat\embed\tomcat-embed-websocket\9.0.24\tomcat-embed-websocket-9.0.24.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\org\hibernate\validator\hibernate-validator\6.0.17.Final\hibernate-validator-6.0.17.Final.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\javax\validation\validation-api\2.0.1.Final\validation-api-2.0.1.Final.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\org\jboss\logging\jboss-logging\3.3.3.Final\jboss-logging-3.3.3.Final.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\com\fasterxml\classmate\1.4.0\classmate-1.4.0.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\org\springframework\spring-web\5.1.9.RELEASE\spring-web-5.1.9.RELEASE.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\org\springframework\spring-webmvc\5.1.9.RELEASE\spring-webmvc-5.1.9.RELEASE.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\org\ow2\asm\asm\5.0.4\asm-5.0.4.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\junit\junit\4.12\junit-4.12.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\org\objenesis\objenesis\2.6\objenesis-2.6.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\org\hamcrest\hamcrest-core\1.3\hamcrest-core-1.3.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\org\springframework\spring-core\5.1.9.RELEASE\spring-core-5.1.9.RELEASE.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\org\springframework\spring-jcl\5.1.9.RELEASE\spring-jcl-5.1.9.RELEASE.jar;E:\software\idea201803\lib\idea_rt.jar com.example.BootDubboHelloConsumerApplication
Connected to the target VM, address: '127.0.0.1:52875', transport: 'socket'

  ████████▄  ███    █▄  ▀█████████▄  ▀█████████▄   ▄██████▄  
  ███   ▀███ ███    ███   ███    ███   ███    ███ ███    ███ 
  ███    ███ ███    ███   ███    ███   ███    ███ ███    ███ 
  ███    ███ ███    ███  ▄███▄▄▄██▀   ▄███▄▄▄██▀  ███    ███ 
  ███    ███ ███    ███ ▀▀███▀▀▀██▄  ▀▀███▀▀▀██▄  ███    ███ 
  ███    ███ ███    ███   ███    ██▄   ███    ██▄ ███    ███ 
  ███   ▄███ ███    ███   ███    ███   ███    ███ ███    ███ 
  ████████▀  ████████▀  ▄█████████▀  ▄█████████▀   ▀██████▀  
                                                             

 :: Dubbo ::        (v2.6.1)

  .   ____          _            __ _ _
 /\\ / ___'_ __ _ _(_)_ __  __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
 \\/  ___)| |_)| | | | | || (_| |  ) ) ) )
  '  |____| .__|_| |_|_| |_\__, | / / / /
 =========|_|==============|___/=/_/_/_/
 :: Spring Boot ::        (v2.1.8.RELEASE)

2019-09-18 15:40:42.314  INFO 52232 --- [           main] c.e.BootDubboHelloConsumerApplication    : Starting BootDubboHelloConsumerApplication on DESKTOP-EAEE93N with PID 52232 (E:\ideaSpace\springboot\springboot-web-helloworld\boot-dubbo-hello-consumer\target\classes started by dingsj in E:\ideaSpace\springboot\springboot-web-helloworld)
2019-09-18 15:40:42.326  INFO 52232 --- [           main] c.e.BootDubboHelloConsumerApplication    : No active profile set, falling back to default profiles: default
2019-09-18 15:40:45.044  INFO 52232 --- [           main] b.f.a.ServiceAnnotationBeanPostProcessor :  [DUBBO] BeanNameGenerator bean can't be found in BeanFactory with name [org.springframework.context.annotation.internalConfigurationBeanNameGenerator], dubbo version: 2.6.1, current host: 192.168.47.1
2019-09-18 15:40:45.044  INFO 52232 --- [           main] b.f.a.ServiceAnnotationBeanPostProcessor :  [DUBBO] BeanNameGenerator will be a instance of org.springframework.context.annotation.AnnotationBeanNameGenerator , it maybe a potential problem on bean name generation., dubbo version: 2.6.1, current host: 192.168.47.1
2019-09-18 15:40:45.047  WARN 52232 --- [           main] b.f.a.ServiceAnnotationBeanPostProcessor :  [DUBBO] No Spring Bean annotating Dubbo's @Service was found under package[com.example.impl], dubbo version: 2.6.1, current host: 192.168.47.1
2019-09-18 15:40:46.539  INFO 52232 --- [           main] o.s.b.w.embedded.tomcat.TomcatWebServer  : Tomcat initialized with port(s): 9092 (http)
2019-09-18 15:40:46.622  INFO 52232 --- [           main] o.apache.catalina.core.StandardService   : Starting service [Tomcat]
2019-09-18 15:40:46.623  INFO 52232 --- [           main] org.apache.catalina.core.StandardEngine  : Starting Servlet engine: [Apache Tomcat/9.0.24]
2019-09-18 15:40:46.863  INFO 52232 --- [           main] o.a.c.c.C.[Tomcat].[localhost].[/]       : Initializing Spring embedded WebApplicationContext
2019-09-18 15:40:46.863  INFO 52232 --- [           main] o.s.web.context.ContextLoader            : Root WebApplicationContext: initialization completed in 4412 ms
2019-09-18 15:40:49.196  INFO 52232 --- [           main] c.a.d.r.zookeeper.ZookeeperRegistry      :  [DUBBO] Load registry store file C:\Users\dingsj\.dubbo\dubbo-registry-dubbo-consumer-192.168.47.131:6666.cache, data: {G_APP_TEST/com.example.hello.service.IHelloService=empty://192.168.47.1/com.example.hello.service.IHelloService?application=dubbo-consumer&category=configurators&dubbo=2.6.1&group=G_APP_TEST&interface=com.example.hello.service.IHelloService&methods=sayHello&pid=55504&side=consumer&timestamp=1568790511847 empty://192.168.47.1/com.example.hello.service.IHelloService?application=dubbo-consumer&category=routers&dubbo=2.6.1&group=G_APP_TEST&interface=com.example.hello.service.IHelloService&methods=sayHello&pid=55504&side=consumer&timestamp=1568790511847 empty://192.168.47.1/com.example.hello.service.IHelloService?application=dubbo-consumer&category=providers&dubbo=2.6.1&group=G_APP_TEST&interface=com.example.hello.service.IHelloService&methods=sayHello&pid=55504&side=consumer&timestamp=1568790511847, com.example.hello.service.IHelloService=empty://192.168.47.1/com.example.hello.service.IHelloService?application=dubbo-consumer&category=configurators&dubbo=2.6.1&interface=com.example.hello.service.IHelloService&methods=sayHello&pid=57744&side=consumer&timestamp=1568792159044 empty://192.168.47.1/com.example.hello.service.IHelloService?application=dubbo-consumer&category=routers&dubbo=2.6.1&interface=com.example.hello.service.IHelloService&methods=sayHello&pid=57744&side=consumer&timestamp=1568792159044 empty://192.168.47.1/com.example.hello.service.IHelloService?application=dubbo-consumer&category=providers&dubbo=2.6.1&interface=com.example.hello.service.IHelloService&methods=sayHello&pid=57744&side=consumer&timestamp=1568792159044, G_APP_TEST/com.example.hello.service.IHelloService:1.0.1=empty://192.168.47.1/com.example.hello.service.IHelloService?application=dubbo-consumer&category=configurators&dubbo=2.6.1&group=G_APP_TEST&interface=com.example.hello.service.IHelloService&methods=sayHello&pid=37640&revision=1.0.1&side=consumer&timestamp=1568790624439&version=1.0.1 empty://192.168.47.1/com.example.hello.service.IHelloService?application=dubbo-consumer&category=routers&dubbo=2.6.1&group=G_APP_TEST&interface=com.example.hello.service.IHelloService&methods=sayHello&pid=37640&revision=1.0.1&side=consumer&timestamp=1568790624439&version=1.0.1 dubbo://192.168.47.1:20880/com.example.hello.service.IHelloService?anyhost=true&application=springboot-dubbo-provider&dubbo=2.6.1&generic=false&group=G_APP_TEST&interface=com.example.hello.service.IHelloService&methods=sayHello&pid=58592&revision=1.0.1&side=provider&timestamp=1568790121624&version=1.0.1 empty://192.168.47.1/com.example.hello.service.IHelloService?application=dubbo-consumer&category=providers,configurators,routers&dubbo=2.6.1&group=G_APP_TEST&interface=com.example.hello.service.IHelloService&methods=sayHello&pid=37640&revision=1.0.1&side=consumer&timestamp=1568790624439&version=1.0.1, com.example.hello.service.HelloService=empty://192.168.47.1/com.example.hello.service.HelloService?application=dubbo-consumer&category=configurators&dubbo=2.6.1&interface=com.example.hello.service.HelloService&methods=sayHello&pid=49244&side=consumer&timestamp=1568769853934 empty://192.168.47.1/com.example.hello.service.HelloService?application=dubbo-consumer&category=routers&dubbo=2.6.1&interface=com.example.hello.service.HelloService&methods=sayHello&pid=49244&side=consumer&timestamp=1568769853934 dubbo://192.168.47.1:20880/com.example.hello.service.HelloService?anyhost=true&application=springboot-dubbo-provider&dubbo=2.6.1&generic=false&interface=com.example.hello.service.HelloService&methods=sayHello&pid=55732&side=provider&timestamp=1568769653681 empty://192.168.47.1/com.example.hello.service.HelloService?application=dubbo-consumer&category=providers,configurators,routers&dubbo=2.6.1&interface=com.example.hello.service.HelloService&methods=sayHello&pid=49244&side=consumer&timestamp=1568769853934, com.example.pro.springbootservice.service.MyService=empty://192.168.47.1/com.example.pro.springbootservice.service.MyService?application=dubbo-consumer&category=configurators&check=false&dubbo=2.6.1&interface=com.example.pro.springbootservice.service.MyService&methods=hello1,hello,bye&pid=26252&side=consumer&timestamp=1568105699560 empty://192.168.47.1/com.example.pro.springbootservice.service.MyService?application=dubbo-consumer&category=routers&check=false&dubbo=2.6.1&interface=com.example.pro.springbootservice.service.MyService&methods=hello1,hello,bye&pid=26252&side=consumer&timestamp=1568105699560 empty://192.168.47.1/com.example.pro.springbootservice.service.MyService?application=dubbo-consumer&category=providers&check=false&dubbo=2.6.1&interface=com.example.pro.springbootservice.service.MyService&methods=hello1,hello,bye&pid=26252&side=consumer&timestamp=1568105699560, G_APP_DEMO/com.example.hello.service.IHelloService:1.0.0=empty://192.168.47.1:20882/com.example.hello.service.IHelloService?anyhost=true&application=dubbo-consumer&category=configurators&check=false&dubbo=2.6.1&generic=false&group=G_APP_DEMO&interface=com.example.hello.service.IHelloService&methods=sayHello&owner=_xxx&pid=8416&revision=1.0.0&side=provider&timeout=1000&timestamp=1568286839279&version=1.0.0}, dubbo version: 2.6.1, current host: 192.168.47.1
2019-09-18 15:40:49.284  INFO 52232 --- [           main] o.a.c.f.imps.CuratorFrameworkImpl        : Starting
2019-09-18 15:40:49.293  INFO 52232 --- [           main] org.apache.zookeeper.ZooKeeper           : Client environment:zookeeper.version=3.4.6-1569965, built on 02/20/2014 09:09 GMT
2019-09-18 15:40:49.294  INFO 52232 --- [           main] org.apache.zookeeper.ZooKeeper           : Client environment:host.name=DESKTOP-EAEE93N
2019-09-18 15:40:49.294  INFO 52232 --- [           main] org.apache.zookeeper.ZooKeeper           : Client environment:java.version=1.8.0_112
2019-09-18 15:40:49.294  INFO 52232 --- [           main] org.apache.zookeeper.ZooKeeper           : Client environment:java.vendor=Oracle Corporation
2019-09-18 15:40:49.294  INFO 52232 --- [           main] org.apache.zookeeper.ZooKeeper           : Client environment:java.home=E:\software\java\JDK8\jre
2019-09-18 15:40:49.294  INFO 52232 --- [           main] org.apache.zookeeper.ZooKeeper           : Client environment:java.class.path=E:\software\java\JDK8\jre\lib\charsets.jar;E:\software\java\JDK8\jre\lib\deploy.jar;E:\software\java\JDK8\jre\lib\ext\access-bridge-64.jar;E:\software\java\JDK8\jre\lib\ext\cldrdata.jar;E:\software\java\JDK8\jre\lib\ext\dnsns.jar;E:\software\java\JDK8\jre\lib\ext\jaccess.jar;E:\software\java\JDK8\jre\lib\ext\jfxrt.jar;E:\software\java\JDK8\jre\lib\ext\localedata.jar;E:\software\java\JDK8\jre\lib\ext\nashorn.jar;E:\software\java\JDK8\jre\lib\ext\sunec.jar;E:\software\java\JDK8\jre\lib\ext\sunjce_provider.jar;E:\software\java\JDK8\jre\lib\ext\sunmscapi.jar;E:\software\java\JDK8\jre\lib\ext\sunpkcs11.jar;E:\software\java\JDK8\jre\lib\ext\zipfs.jar;E:\software\java\JDK8\jre\lib\javaws.jar;E:\software\java\JDK8\jre\lib\jce.jar;E:\software\java\JDK8\jre\lib\jfr.jar;E:\software\java\JDK8\jre\lib\jfxswt.jar;E:\software\java\JDK8\jre\lib\jsse.jar;E:\software\java\JDK8\jre\lib\management-agent.jar;E:\software\java\JDK8\jre\lib\plugin.jar;E:\software\java\JDK8\jre\lib\resources.jar;E:\software\java\JDK8\jre\lib\rt.jar;E:\ideaSpace\springboot\springboot-web-helloworld\boot-dubbo-hello-consumer\target\classes;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\com\alibaba\dubbo\2.6.1\dubbo-2.6.1.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\org\springframework\spring-context\5.1.9.RELEASE\spring-context-5.1.9.RELEASE.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\org\springframework\spring-aop\5.1.9.RELEASE\spring-aop-5.1.9.RELEASE.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\org\springframework\spring-beans\5.1.9.RELEASE\spring-beans-5.1.9.RELEASE.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\org\springframework\spring-expression\5.1.9.RELEASE\spring-expression-5.1.9.RELEASE.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\org\javassist\javassist\3.20.0-GA\javassist-3.20.0-GA.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\org\jboss\netty\netty\3.2.5.Final\netty-3.2.5.Final.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\com\alibaba\spring\boot\dubbo-spring-boot-starter\2.0.0\dubbo-spring-boot-starter-2.0.0.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\org\springframework\boot\spring-boot-starter-actuator\2.1.8.RELEASE\spring-boot-starter-actuator-2.1.8.RELEASE.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\org\springframework\boot\spring-boot-actuator-autoconfigure\2.1.8.RELEASE\spring-boot-actuator-autoconfigure-2.1.8.RELEASE.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\org\springframework\boot\spring-boot-actuator\2.1.8.RELEASE\spring-boot-actuator-2.1.8.RELEASE.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\io\micrometer\micrometer-core\1.1.6\micrometer-core-1.1.6.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\org\hdrhistogram\HdrHistogram\2.1.9\HdrHistogram-2.1.9.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\org\latencyutils\LatencyUtils\2.0.3\LatencyUtils-2.0.3.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\com\alibaba\dubbo-registry-zookeeper\2.6.1\dubbo-registry-zookeeper-2.6.1.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\com\alibaba\dubbo-registry-api\2.6.1\dubbo-registry-api-2.6.1.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\com\alibaba\dubbo-cluster\2.6.1\dubbo-cluster-2.6.1.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\com\alibaba\dubbo-rpc-api\2.6.1\dubbo-rpc-api-2.6.1.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\com\alibaba\dubbo-serialization-api\2.6.1\dubbo-serialization-api-2.6.1.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\com\alibaba\dubbo-container-api\2.6.1\dubbo-container-api-2.6.1.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\com\alibaba\dubbo-remoting-zookeeper\2.6.1\dubbo-remoting-zookeeper-2.6.1.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\com\alibaba\dubbo-common\2.6.1\dubbo-common-2.6.1.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\commons-logging\commons-logging\1.2\commons-logging-1.2.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\com\alibaba\hessian-lite\3.2.2\hessian-lite-3.2.2.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\com\alibaba\fastjson\1.2.46\fastjson-1.2.46.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\com\esotericsoftware\kryo\4.0.1\kryo-4.0.1.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\com\esotericsoftware\reflectasm\1.11.3\reflectasm-1.11.3.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\com\esotericsoftware\minlog\1.3.0\minlog-1.3.0.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\de\javakaffee\kryo-serializers\0.42\kryo-serializers-0.42.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\de\ruedigermoeller\fst\2.48-jdk-6\fst-2.48-jdk-6.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\com\cedarsoftware\java-util\1.9.0\java-util-1.9.0.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\com\cedarsoftware\json-io\2.5.1\json-io-2.5.1.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\org\apache\curator\curator-framework\2.12.0\curator-framework-2.12.0.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\org\apache\curator\curator-client\2.12.0\curator-client-2.12.0.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\com\google\guava\guava\16.0.1\guava-16.0.1.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\com\101tec\zkclient\0.7\zkclient-0.7.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\org\slf4j\slf4j-api\1.7.28\slf4j-api-1.7.28.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\org\apache\zookeeper\zookeeper\3.4.6\zookeeper-3.4.6.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\jline\jline\0.9.94\jline-0.9.94.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\io\netty\netty\3.7.0.Final\netty-3.7.0.Final.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\org\springframework\boot\spring-boot-starter-web\2.1.8.RELEASE\spring-boot-starter-web-2.1.8.RELEASE.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\org\springframework\boot\spring-boot-starter\2.1.8.RELEASE\spring-boot-starter-2.1.8.RELEASE.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\org\springframework\boot\spring-boot\2.1.8.RELEASE\spring-boot-2.1.8.RELEASE.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\org\springframework\boot\spring-boot-autoconfigure\2.1.8.RELEASE\spring-boot-autoconfigure-2.1.8.RELEASE.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\org\springframework\boot\spring-boot-starter-logging\2.1.8.RELEASE\spring-boot-starter-logging-2.1.8.RELEASE.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\ch\qos\logback\logback-classic\1.2.3\logback-classic-1.2.3.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\ch\qos\logback\logback-core\1.2.3\logback-core-1.2.3.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\org\apache\logging\log4j\log4j-to-slf4j\2.11.2\log4j-to-slf4j-2.11.2.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\org\apache\logging\log4j\log4j-api\2.11.2\log4j-api-2.11.2.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\org\slf4j\jul-to-slf4j\1.7.28\jul-to-slf4j-1.7.28.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\javax\annotation\javax.annotation-api\1.3.2\javax.annotation-api-1.3.2.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\org\yaml\snakeyaml\1.23\snakeyaml-1.23.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\org\springframework\boot\spring-boot-starter-json\2.1.8.RELEASE\spring-boot-starter-json-2.1.8.RELEASE.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\com\fasterxml\jackson\core\jackson-databind\2.9.9.3\jackson-databind-2.9.9.3.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\com\fasterxml\jackson\core\jackson-annotations\2.9.0\jackson-annotations-2.9.0.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\com\fasterxml\jackson\core\jackson-core\2.9.9\jackson-core-2.9.9.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\com\fasterxml\jackson\datatype\jackson-datatype-jdk8\2.9.9\jackson-datatype-jdk8-2.9.9.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\com\fasterxml\jackson\datatype\jackson-datatype-jsr310\2.9.9\jackson-datatype-jsr310-2.9.9.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\com\fasterxml\jackson\module\jackson-module-parameter-names\2.9.9\jackson-module-parameter-names-2.9.9.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\org\springframework\boot\spring-boot-starter-tomcat\2.1.8.RELEASE\spring-boot-starter-tomcat-2.1.8.RELEASE.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\org\apache\tomcat\embed\tomcat-embed-core\9.0.24\tomcat-embed-core-9.0.24.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\org\apache\tomcat\embed\tomcat-embed-el\9.0.24\tomcat-embed-el-9.0.24.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\org\apache\tomcat\embed\tomcat-embed-websocket\9.0.24\tomcat-embed-websocket-9.0.24.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\org\hibernate\validator\hibernate-validator\6.0.17.Final\hibernate-validator-6.0.17.Final.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\javax\validation\validation-api\2.0.1.Final\validation-api-2.0.1.Final.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\org\jboss\logging\jboss-logging\3.3.3.Final\jboss-logging-3.3.3.Final.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\com\fasterxml\classmate\1.4.0\classmate-1.4.0.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\org\springframework\spring-web\5.1.9.RELEASE\spring-web-5.1.9.RELEASE.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\org\springframework\spring-webmvc\5.1.9.RELEASE\spring-webmvc-5.1.9.RELEASE.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\org\ow2\asm\asm\5.0.4\asm-5.0.4.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\junit\junit\4.12\junit-4.12.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\org\objenesis\objenesis\2.6\objenesis-2.6.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\org\hamcrest\hamcrest-core\1.3\hamcrest-core-1.3.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\org\springframework\spring-core\5.1.9.RELEASE\spring-core-5.1.9.RELEASE.jar;E:\software\java\apache-maven-3.3.9\LIB-DOWNLOADS\org\springframework\spring-jcl\5.1.9.RELEASE\spring-jcl-5.1.9.RELEASE.jar;E:\software\idea201803\lib\idea_rt.jar;E:\software\idea201803\lib\rt\debugger-agent.jar
2019-09-18 15:40:49.294  INFO 52232 --- [           main] org.apache.zookeeper.ZooKeeper           : Client environment:java.library.path=E:\software\java\JDK8\bin;C:\WINDOWS\Sun\Java\bin;C:\WINDOWS\system32;C:\WINDOWS;E:\SOFTWARE\ORACLE\PRODUCT\11.2.0\DBHOME_1\BIN;E:\software\Oracle\product\11.2.0\dbhome_1\bin;C:\MinGW\bin;C:\WINDOWS\SYSTEM32;C:\WINDOWS;C:\WINDOWS\SYSTEM32\WBEM;C:\WINDOWS\SYSTEM32\WINDOWSPOWERSHELL\V1.0\;E:\SOFTWARE\SVN\BIN;C:\PROGRAM FILES (X86)\NVIDIA CORPORATION\PHYSX\COMMON;E:\software\java\JDK8\BIN;E:\software\java\JDK8\JRE\BIN;E:\SOFTWARE\MYSQL\BIN;E:\software\java\apache-maven-3.3.9\BIN;E:\SOFTWARE\NODE\;E:\SOFTWARE\GIT\CMD;E:\SOFTWARE\TORTOISEGIT\BIN;C:\WINDOWS\SYSTEM32;C:\WINDOWS;C:\WINDOWS\SYSTEM32\WBEM;C:\WINDOWS\SYSTEM32\WINDOWSPOWERSHELL\V1.0\;C:\Program Files\WIDCOMM\Bluetooth Software\;C:\Program Files\WIDCOMM\Bluetooth Software\syswow64;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;E:\software\Git\cmd;C:\WINDOWS\System32\OpenSSH\;C:\Users\dingsj\AppData\Roaming\npm;C:\Users\dingsj\AppData\Local\Microsoft\WindowsApps;C:\MinGW\bin;;E:\software\Microsoft VS Code\bin;.
2019-09-18 15:40:49.294  INFO 52232 --- [           main] org.apache.zookeeper.ZooKeeper           : Client environment:java.io.tmpdir=C:\Users\dingsj\AppData\Local\Temp\
2019-09-18 15:40:49.294  INFO 52232 --- [           main] org.apache.zookeeper.ZooKeeper           : Client environment:java.compiler=<NA>
2019-09-18 15:40:49.294  INFO 52232 --- [           main] org.apache.zookeeper.ZooKeeper           : Client environment:os.name=Windows 10
2019-09-18 15:40:49.294  INFO 52232 --- [           main] org.apache.zookeeper.ZooKeeper           : Client environment:os.arch=amd64
2019-09-18 15:40:49.295  INFO 52232 --- [           main] org.apache.zookeeper.ZooKeeper           : Client environment:os.version=10.0
2019-09-18 15:40:49.295  INFO 52232 --- [           main] org.apache.zookeeper.ZooKeeper           : Client environment:user.name=dingsj
2019-09-18 15:40:49.295  INFO 52232 --- [           main] org.apache.zookeeper.ZooKeeper           : Client environment:user.home=C:\Users\dingsj
2019-09-18 15:40:49.295  INFO 52232 --- [           main] org.apache.zookeeper.ZooKeeper           : Client environment:user.dir=E:\ideaSpace\springboot\springboot-web-helloworld
2019-09-18 15:40:49.297  INFO 52232 --- [           main] org.apache.zookeeper.ZooKeeper           : Initiating client connection, connectString=192.168.47.131:6666 sessionTimeout=60000 watcher=org.apache.curator.ConnectionState@4e224df5
2019-09-18 15:40:49.335  INFO 52232 --- [68.47.131:6666)] org.apache.zookeeper.ClientCnxn          : Opening socket connection to server 192.168.47.131/192.168.47.131:6666. Will not attempt to authenticate using SASL (unknown error)
2019-09-18 15:40:49.340  INFO 52232 --- [68.47.131:6666)] org.apache.zookeeper.ClientCnxn          : Socket connection established to 192.168.47.131/192.168.47.131:6666, initiating session
2019-09-18 15:40:49.363  INFO 52232 --- [68.47.131:6666)] org.apache.zookeeper.ClientCnxn          : Session establishment complete on server 192.168.47.131/192.168.47.131:6666, sessionid = 0x16d22fbcd8d0064, negotiated timeout = 40000
2019-09-18 15:40:49.387  INFO 52232 --- [ain-EventThread] o.a.c.f.state.ConnectionStateManager     : State change: CONNECTED
2019-09-18 15:40:49.395  INFO 52232 --- [           main] c.a.d.r.zookeeper.ZookeeperRegistry      :  [DUBBO] Subscribe: consumer://192.168.47.1/com.example.hello.service.IHelloService?application=dubbo-consumer&category=providers,configurators,routers&dubbo=2.6.1&group=G_APP_TEST&interface=com.example.hello.service.IHelloService&methods=sayHello&pid=52232&revision=1.0.1&side=consumer&timestamp=1568792449104&version=1.0.1, dubbo version: 2.6.1, current host: 192.168.47.1
2019-09-18 15:40:49.495  INFO 52232 --- [           main] c.a.d.r.zookeeper.ZookeeperRegistry      :  [DUBBO] Notify urls for subscribe url consumer://192.168.47.1/com.example.hello.service.IHelloService?application=dubbo-consumer&category=providers,configurators,routers&dubbo=2.6.1&group=G_APP_TEST&interface=com.example.hello.service.IHelloService&methods=sayHello&pid=52232&revision=1.0.1&side=consumer&timestamp=1568792449104&version=1.0.1, urls: [dubbo://192.168.47.1:20880/com.example.hello.service.IHelloService?anyhost=true&application=springboot-dubbo-provider&dubbo=2.6.1&generic=false&group=G_APP_TEST&interface=com.example.hello.service.IHelloService&methods=sayHello&pid=58592&revision=1.0.1&side=provider&timestamp=1568790121624&version=1.0.1, empty://192.168.47.1/com.example.hello.service.IHelloService?application=dubbo-consumer&category=configurators&dubbo=2.6.1&group=G_APP_TEST&interface=com.example.hello.service.IHelloService&methods=sayHello&pid=52232&revision=1.0.1&side=consumer&timestamp=1568792449104&version=1.0.1, empty://192.168.47.1/com.example.hello.service.IHelloService?application=dubbo-consumer&category=routers&dubbo=2.6.1&group=G_APP_TEST&interface=com.example.hello.service.IHelloService&methods=sayHello&pid=52232&revision=1.0.1&side=consumer&timestamp=1568792449104&version=1.0.1], dubbo version: 2.6.1, current host: 192.168.47.1
2019-09-18 15:40:49.704  INFO 52232 --- [           main] c.a.d.remoting.transport.AbstractClient  :  [DUBBO] Successed connect to server /192.168.47.1:20880 from NettyClient 192.168.47.1 using dubbo version 2.6.1, channel is NettyChannel [channel=[id: 0x0566e142, /192.168.47.1:52893 => /192.168.47.1:20880]], dubbo version: 2.6.1, current host: 192.168.47.1
2019-09-18 15:40:49.704  INFO 52232 --- [           main] c.a.d.remoting.transport.AbstractClient  :  [DUBBO] Start NettyClient DESKTOP-EAEE93N/192.168.47.1 connect to the server /192.168.47.1:20880, dubbo version: 2.6.1, current host: 192.168.47.1
2019-09-18 15:40:49.791  INFO 52232 --- [           main] com.alibaba.dubbo.config.AbstractConfig  :  [DUBBO] Refer dubbo service com.example.hello.service.IHelloService from url zookeeper://192.168.47.131:6666/com.alibaba.dubbo.registry.RegistryService?anyhost=true&application=dubbo-consumer&check=false&dubbo=2.6.1&generic=false&group=G_APP_TEST&interface=com.example.hello.service.IHelloService&methods=sayHello&pid=52232&register.ip=192.168.47.1&remote.timestamp=1568790121624&revision=1.0.1&side=consumer&timestamp=1568792449104&version=1.0.1, dubbo version: 2.6.1, current host: 192.168.47.1
2019-09-18 15:40:49.803  INFO 52232 --- [           main] c.a.d.c.s.b.f.a.ReferenceBeanBuilder     : <dubbo:reference object="com.alibaba.dubbo.common.bytecode.proxy0@1e3f0aea" singleton="true" interface="com.example.hello.service.IHelloService" uniqueServiceName="G_APP_TEST/com.example.hello.service.IHelloService:1.0.1" generic="false" version="1.0.1" listener="" filter="" group="G_APP_TEST" id="com.example.hello.service.IHelloService" /> has been built.
2019-09-18 15:40:50.445  INFO 52232 --- [           main] o.s.s.concurrent.ThreadPoolTaskExecutor  : Initializing ExecutorService 'applicationTaskExecutor'
2019-09-18 15:40:52.016  INFO 52232 --- [           main] o.s.b.a.e.web.EndpointLinksResolver      : Exposing 2 endpoint(s) beneath base path '/actuator'
2019-09-18 15:40:52.264  INFO 52232 --- [           main] o.s.b.w.embedded.tomcat.TomcatWebServer  : Tomcat started on port(s): 9092 (http) with context path ''
2019-09-18 15:40:52.274  INFO 52232 --- [           main] c.e.BootDubboHelloConsumerApplication    : Started BootDubboHelloConsumerApplication in 11.557 seconds (JVM running for 14.461)
2019-09-18 15:40:52.576  INFO 52232 --- [on(2)-127.0.0.1] o.a.c.c.C.[Tomcat].[localhost].[/]       : Initializing Spring DispatcherServlet 'dispatcherServlet'
2019-09-18 15:40:52.576  INFO 52232 --- [on(2)-127.0.0.1] o.s.web.servlet.DispatcherServlet        : Initializing Servlet 'dispatcherServlet'
2019-09-18 15:40:52.612  INFO 52232 --- [on(2)-127.0.0.1] o.s.web.servlet.DispatcherServlet        : Completed initialization in 35 ms

项目已正常启动。
5. 访问项目:http://localhost:9092/hello
在这里插入图片描述
项目输出:

Consumer: Controller:hello .....
Consumer Service:  testHello...

到这里,项目已算实现了一个完整的dubbo调用过程。

项目中还有多处可以改动的地方:

  1. 消费者实现springboot 配置文件形式,不要xml文件
  2. 消费者pom依赖引入生产者 jar包,这样就不用自己建立生产者接口信息了。
  3. 若是实现引入生产者 jar 包,在消费时可以使用 @Resource @Component @Reference 注解注入接口
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值