新建目录,放入jar包
例如 src/main/resources/libs/xxx.jar
pom文件中引入
<dependency>
<groupId>自定义</groupId>
<artifactId>自定义</artifactId>
<version>自定义</version>
<scope>system</scope>
<systemPath>${project.basedir}/src/main/resources/libs/xxx.jar</systemPath>
</dependency>
打包配置
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<includeSystemScope>true</includeSystemScope> <!--设定为true-->
</configuration>
</plugin>
</plugins>
</build>
我使用的是idea,不需要添加library 配置module,pom中写好即可