1.新建一个空工程
2.新建Modul New-->Modul
3.选择maven(不选模板,放在工程下)
4.选择依赖
1 <project xmlns="http://maven.apache.org/POM/4.0.0" 2 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 3 xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4 <modelVersion>4.0.0</modelVersion> 5 <groupId>com.tedu</groupId> 6 <artifactId>sp01-commons</artifactId> 7 <version>0.0.1-SNAPSHOT</version> 8 <name>sp01-commons</name> 9 <dependencies> 10 <dependency> 11 <groupId>com.fasterxml.jackson.module</groupId> 12 <artifactId>jackson-module-parameter-names</artifactId> 13 <version>2.9.8</version> 14 </dependency> 15 <dependency> 16 <groupId>com.fasterxml.jackson.datatype</groupId> 17 <artifactId>jackson-datatype-jdk8</artifactId> 18 <version>2.9.8</version> 19 </dependency> 20 <dependency> 21 <groupId>com.fasterxml.jackson.datatype</groupId> 22 <artifactId>jackson-datatype-jsr310</artifactId> 23 <version>2.9.8</version> 24 </dependency> 25 <dependency> 26 <groupId>com.fasterxml.jackson.datatype</groupId> 27 <artifactId>jackson-datatype-guava</artifactId> 28 <version>2.9.8</version> 29 </dependency> 30 31 <dependency> 32 <groupId>org.projectlombok</groupId> 33 <artifactId>lombok</artifactId> 34 <version>1.18.6</version> 35 </dependency> 36 <dependency> 37 <groupId>javax.servlet</groupId> 38 <artifactId>javax.servlet-api</artifactId> 39 <version>3.1.0</version> 40 </dependency> 41 <dependency> 42 <groupId>org.slf4j</groupId> 43 <artifactId>slf4j-api</artifactId> 44 <version>1.7.26</version> 45 </dependency> 46 <dependency> 47 <groupId>org.apache.commons</groupId> 48 <artifactId>commons-lang3</artifactId> 49 <version>3.9</version> 50 </dependency> 51 52 </dependencies> 53 54 <build> 55 <plugins> 56 <plugin> 57 <groupId>org.apache.maven.plugins</groupId> 58 <artifactId>maven-compiler-plugin</artifactId> 59 <version>3.8.0</version> 60 <configuration> 61 <source>1.8</source> 62 <target>1.8</target> 63 </configuration> 64 </plugin> 65 </plugins> 66 </build> 67 </project>
5.创建第二个项目(maven,或者springboot)
6.在pom.xml中继承第一个项目