创建父子工程

1.新建一个空白的maven项目

  

   

   

   删除src文件夹,在pom中新建<packaging>pom</packaging>

 

2.创建springboot项目模块

  

   

  

   

   修改配置文件pom.xml

  

  在父工程的pom.xml中引入mqtt-driver项目

  <modules>   
     <module>mqtt-driver</module>
  </modules>

3.重复第二步创建model模块

  在driver的pom.xml中引入model模块

  <dependency>
  <groupId>com.example.agan</groupId>
  <artifactId>mqtt-model</artifactId>
  <version>3.2.0</version>
  </dependency>

  在父工程的pom.xml中引入mqtt-driver项目

  <modules>   
     <module>mqtt-model</model>
  </modules>

4.测试项目

  

   

 

 


 

posted @ 2021-10-11 16:56  921341593  阅读(48)  评论(0)    收藏  举报