首先新建父工程
新建spring boot项目
填写项目信息
指定该子项目的路径
如果是组件类型的子项目 可以删除application.xml和启动类
父工程pom文件
-
<?xml version="1.0" encoding="UTF-8"?>
-
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-
<modelVersion>4.0.0</modelVersion>
-
<groupId>com.demo</groupId>
-
<artifactId>project</artifactId>
-
<version>1.0.0-SNAPSHOT</version>
-
-
<properties>
-
<spring-boot.version>2.3.5.RELEASE</spring-boot.version>
-
</properties>
-
-
<modules>
-
<module>common-mail</module>
-
</modules>
-
-
<packaging>pom</packaging>
-
-
<dependencyManagement>
-
<dependencies>
-
<dependency>
-
<groupId>com.xx</groupId>
-
<artifactId>common-assembly</artifactId>
-
<version>${vanpeng.version}</version>
-
</dependency>
-
</dependencies>
-
</dependencyManagement>
-
-
<dependencies>
-
<!-- swagger -->
-
<dependency>
-
<groupId>io.swagger</groupId>
-
<artifactId>swagger-annotations</artifactId>
-
<version>1.5.10</version>
-
</dependency>
-
</dependencies>
-
-
<build>
-
<plugins>
-
<plugin>
-
<groupId>org.apache.maven.plugins</groupId>
-
<artifactId>maven-compiler-plugin</artifactId>
-
<configuration>
-
<source>${java.version}</source>
-
<target>${java.version}</target>
-
<encoding>${project.build.sourceEncoding}</encoding>
-
</configuration>
-
</plugin>
-
</plugins>
-
</build>
-
-
</project>