天天看点

dubbo-springboot

一、服务提供者boot-user-service-provider

服务提供者boot-user-service-provider代码结构如下:

dubbo-springboot

1、服务提供者boot-user-service-provider引入spring-boot-starter以及dubbo和curator的依赖

<dependency>

  <groupId>org.springframework.boot</groupId>

  <artifactId>spring-boot-starter</artifactId>

</dependency>

  <groupId>com.alibaba.boot</groupId>

  <artifactId>dubbo-spring-boot-starter</artifactId>

  <version>0.2.0</version>

2、配置文件application.properties

3、UserService接口实现UserServiceImpl

4、主程序

二、服务消费者boot-order-service-consumer

服务消费者boot-order-service-consumer代码结构如下:

dubbo-springboot

1、pom.xml

2、配置文件application.propertise

3、OrderService接口实现OrderServiceImpl

4、OrderController

5、主程序