dubbo安装
====================================provider
1.创建一个SpringBoot项目 Dubbo-provider。不用导入什么插件
2.放入依赖
<properties> 标签里放入 <dubbo.version>2.7.1</dubbo.version>
<!-- Aapche Dubbo -->
<dependency>
<groupId>org.apache.dubbo</groupId>
<artifactId>dubbo-spring-boot-starter</artifactId>
<version>${dubbo.version}</version>
</dependency>
<dependency>
<groupId>org.apache.dubbo</groupId>
<artifactId>dubbo</artifactId>
<version>${dubbo.version}</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.apache.curator/curator-framework -->
<dependency>
<groupId>org.apache.curator</groupId>
<artifactId>curator-framework</artifactId>
<version>4.2.0</version>
</dependency>
<dependency>
<groupId>org.apache.curator</groupId>
<artifactId>curator-recipes</artifactId>
<version>4.2.0</version>
<exclusions>
<exclusion>
<groupId>org.apache.zookeeper</groupId>
<artifactId>zookeeper</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.apache.zookeeper</groupId>
<artifactId>zookeeper</artifactId>
<version>3.4.14</version>
</dependency>
3.修改配置application.properties
4.创建服务实现的类以及接口
5.linux里的zookeeper要启动。zookeeper作为注册中心
====================================customer
1.创建一个SpringBoot项目 Dubbo-customer。顺便导入spring-web
2.引入和上面同样的依赖。。同时配置文件配一下
3.需要provide的接口拿过来。以及它的Controller
ps: pom 里的zookeeper版本 和linux里要一致把