IDEA creates a new module in an existing project

1. Right-click on the newly created project name and select New->Module.

2. Select the project address for Location, select Maven for Type, select Java for Language, enter com. group name (package name) for Group, enter the project name for Artifact, select 8 for Java, select Jar for Packaging, and click Next.

3. The version of Spring Boot does not need to be too high, select the project dependency and click Finish.

4. Open the pom.xml of the parent project

<modules>
        <module>子项目的名字(新建子项目的Artifact)</module>
</modules>

5. Open the pom.xml of the subproject
 

<parent>
        <groupId>父项目的groupId</groupId>
        <artifactId>父项目的artifactId</artifactId>
        <version>2.7.13</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>子项目名</artifactId>

Guess you like

Origin blog.csdn.net/qq_53768302/article/details/131528172