一、将jar包放在resources目录下
二、pom文件添加依赖
<dependency>
<groupId>com.xxx</groupId>
<artifactId>xxx-server</artifactId>
<version>2.3.0.5</version>
<scope>system</scope>
<systemPath>${project.basedir}${file.separator}src${file.separator}main${file.separator}resources${file.separator}lib${file.separator}wcspsdk-server-2.3.0.5.jar</systemPath>
</dependency>
依赖添加后,如果点击systemPath能正常跳转到jar包,则添加成功
三、添加maven插件
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
#一定要配置这个,否则无法将本地jar包
<includeSystemScope>true</includeSystemScope>
</configuration>
</plugin>