在SpringBoot中导入本地Maven Jar包
# 在SpringBoot中导入本地Maven Jar包
# 1.将本地程序打成jar包
在pom.xml文件中加入
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.2.4</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<createDependencyReducedPom>false</createDependencyReducedPom>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
然后打成jar包
mvn clean package
1
# 2.导入SpringBoot工程
在src目录下创建一个lib目录,将jar包放进去
右键将lib Add as Library
即可使用