1. 父项目打包方式为 pom
<packaging>pom</packaging>
2. 父项目版本配置
<properties><maven.compiler.source>17</maven.compiler.source><maven.compiler.target>17</maven.compiler.target><project.build.sourceEncoding>UTF-8</project.build.sourceEncoding><lombok.version>1.18.16</lombok.version></properties>
3. 父项目依赖-Lombok为例
<dependencies><dependency><groupId>org.projectlombok</groupId><artifactId>lombok</artifactId></dependency></dependencies>
4. 依赖管理器
<dependencyManagement><dependencies><dependency><groupId>org.projectlombok</groupId><artifactId>lombok</artifactId><version>${lombok.version}</version></dependency></dependencies></dependencyManagement>
5.在子模块就可以直接使用lombok了