动力节点-王妈妈Springboot教程(七)SpringBoot集成Dubbo

  • Post author:
  • Post category:其他


第七章 SpringBoot集成Dubbo


  • 官方下载地址


动力节点springboot资料


  • 视频观看地址


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>org.apache.dubbo</gr



版权声明:本文为A_coding原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。