第七章 SpringBoot集成Dubbo
- 官方下载地址
- 视频观看地址
https://www.bilibili.com/video/BV1XQ4y1m7ex
7.1 看 SpringBoot继承Dubbo的文档
https://github.com/apache/dubbo-spring-boot-project/blob/master/README_CN.md
7.2 公共项目
独立的maven项目: 定义了接口和数据类
public class Student implements Serializable {
private static final long serialVersionUID = 1901229007746699151L;
private Integer id;
private String name;
private Integer age;
}
public interface StudentService {
Student queryStudent(Integer id);
}
7.3 提供者
- 创建SpringBoot项目
1) pom.xml
<dependencies>
<!--加入公共项目的gav-->
<dependency>
<groupId>com.bjpowernode</groupId>
<artifactId>022-interface-api</artifactId>
<version>1.0.0</version>
</dependency>
<!--dubbo依赖-->
<dependency>
<groupId>