此 demo 主要演示了 Spring Boot 如何集成 Dubbo,demo 分了3个module,分别为公共模块
spring-boot-demo-dubbo-common
、服务提供方spring-boot-demo-dubbo-provider
、服务调用方spring-boot-demo-dubbo-consumer
本例注册中心使用的是 zookeeper,作者编写本demo时,采用docker方式运行 zookeeper
下载镜像:docker pull wurstmeister/zookeeper
运行容器:docker run -d -p 2181:2181 -p 2888:2888 -p 2222:22 -p 3888:3888 --name zk wurstmeister/zookeeper
停止容器:docker stop zk
启动容器:docker start zk
spring-boot-demo-dubbo-provider
目录,运行 SpringBootDemoDubboProviderApplication.java
spring-boot-demo-dubbo-consumer
目录,运行 SpringBootDemoDubboConsumerApplication.java