一、新建一个maven项目

搭建maven聚合工程包含springboot模块

搭建maven聚合工程包含springboot模块

搭建maven聚合工程包含springboot模块

二、删除src    打开pom.xml

补充标签

<packaging>pom</packaging>

新建

<module>brr-mapper</module>
<module>brr-service</module>
<module>brr-api</module>
<module>brr-model</module>
<module>brr-common</module>

module

搭建maven聚合工程包含springboot模块

搭建maven聚合工程包含springboot模块

搭建maven聚合工程包含springboot模块

新建springboot模块

<module>brr-web</module>

搭建maven聚合工程包含springboot模块

搭建maven聚合工程包含springboot模块

搭建maven聚合工程包含springboot模块

三、修改生成的pom文件,以及添加各模块之间的依赖关系

1、将brr-web模块pom.xml中的springboot依赖剪贴到总pom文件

如下

搭建maven聚合工程包含springboot模块

brr-web的pom的parent改为总pom的坐标,并添加其他模块的依赖

,如下

搭建maven聚合工程包含springboot模块

其他模块补充版本号标签

如下

搭建maven聚合工程包含springboot模块

最后启动

brr-web中的启动类,可以打印一句启动成功

搭建maven聚合工程包含springboot模块

启动成功如下

搭建maven聚合工程包含springboot模块

 

初步搭建完毕,可以添加配置和依赖进行开发,把web模块中的springboot依赖剪贴到总pom中,各模块使用到的单个依赖放到自己的pom中或者都放在中的pom中统一管理,也不乱

提交gitHub

搭建maven聚合工程包含springboot模块

文件显示红色后先add本地,再commit file,选择文件commit and push 

---------------------------完事大吉! 

四、新建develop分支

搭建maven聚合工程包含springboot模块

push分支到远端

再develop分支开发,并合并到master

搭建maven聚合工程包含springboot模块

再push本地master到远端即可

相关文章:

  • 2021-12-14
  • 2022-12-23
  • 2022-03-03
  • 2021-05-16
  • 2022-01-01
  • 2022-12-23
  • 2021-10-19
猜你喜欢
  • 2021-09-06
  • 2021-12-03
  • 2022-12-23
  • 2021-05-27
  • 2021-12-12
  • 2021-08-21
相关资源
相似解决方案