1、創建目錄:src/main/webapp/WEB-INF/lib,並將自定義jar放到該目錄
2、pom.xml配置:
<dependency>
<groupId>com.baidu.fsg</groupId>
<artifactId>dlock</artifactId>
<version>1.0.0-SNAPSHOT</version>
<scope>system</scope>
<systemPath>${project.basedir}/src/main/webapp/WEB-INF/lib/dlock-1.0.0-SNAPSHOT.jar</systemPath>
</dependency>
3、添加打包插件:
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<includeSystemScope>true</includeSystemScope>
</configuration>
</plugin>