一 创建父工程

  1. 打开idea点击create new project
    idea搭建多maven模块的springboot项目
  2. 选择maven,勾选create from archetype,点击next
    idea搭建多maven模块的springboot项目
  3. 填写groupid和artifactid,点击next
  4. 确定项目位置后点击finish
  5. 删除src文件夹
    idea搭建多maven模块的springboot项目

二 创建普通子工程

  1. 在项目名上右键,New->Module
    idea搭建多maven模块的springboot项目
  2. 选择maven,填写这个子工程的artifactId
    idea搭建多maven模块的springboot项目

三 添加springboot的子工程

  1. 在项目名上右键,New->Module
  2. 选择Spring Initializr,点击next
  3. 填写groupid和artifactId,然后点击next
    idea搭建多maven模块的springboot项目
  4. 选择springboot版本和添加的一些starter,点击next,点击finish
    idea搭建多maven模块的springboot项目
  5. 修改父工程的pom.xml,添加module.添加普通maven子工程的时候父工程能自动添加module,但是如果添加的是springboot的子工程,父工程的pom不会自动添加module.
    idea搭建多maven模块的springboot项目

相关文章:

  • 2022-12-23
  • 2021-06-05
  • 2021-11-25
  • 2022-12-23
  • 2022-12-23
  • 2021-04-18
  • 2021-10-10
  • 2022-12-23
猜你喜欢
  • 2021-10-01
  • 2021-06-13
  • 2021-06-04
  • 2021-11-19
  • 2021-06-21
  • 2021-05-27
  • 2021-04-23
相关资源
相似解决方案