IDEA新建多模块maven项目
1、new =>projetc=>maven=>,新建完成后删除src目录
![](https://img2023.cnblogs.com/blog/2350829/202307/2350829-20230706154559311-688120250.png)
2、增加java模块 例:robots2-common
项目根目录就是【robots2-parent】
右键项目,open model settings选择新建模块new module
![](https://img2023.cnblogs.com/blog/2350829/202307/2350829-20230706154621105-1096236339.png)
![](https://img2023.cnblogs.com/blog/2350829/202307/2350829-20230706154635078-698548584.png)
3、增加web模块 ,配置spring入口信息
项目根目录就是【robots2-parent】
右键项目,open model settings选择新建模块new module
创建之后新建resources,设置文件夹为资源,新建java文件夹
![](https://img2023.cnblogs.com/blog/2350829/202307/2350829-20230706154657260-1910967495.png)
![](https://img2023.cnblogs.com/blog/2350829/202307/2350829-20230706154712122-353392129.png)