一、在resources目录下面新建lib目录,并把jar放到该目录下
二、添加依赖
1、其中groupId和artifactId的内容自定义(随便写)
2、scope填写:system
3、systemPath填写:${project.basedir}/src/main/resources/lib/xxx.jar
<dependency>
<groupId>com.eetrust.common</groupId>
<artifactId>com.eetrust.common.security.crypt</artifactId>
<version>1.0</version>
<scope>system</scope>
<systemPath>${project.basedir}/src/main/resources/lib/xxx.jar</systemPath>
</dependency>
三、添加插件
1、includeSystemScope一定要为true
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<includeSystemScope>true</includeSystemScope>
</configuration>
</plugin>
四、效果