1、引入需要的jar包
<dependency>
<groupId>com.sdk</groupId>
<artifactId>sdk-auto</artifactId>
<version>0.0.1</version>
<scope>system</scope>
<systemPath>${project.basedir}/...(jar包在项目中的路径))</systemPath>
</dependency>
system:声明依赖项不从maven仓库中下载jar包,从本地系统中获取。
systemPath:声明本地jar包路径
${project.basedir}:映射项目根目录
2:打开 includeSystemScope 设置为TRUE,否则无法把引入本地的jar包导入到项目jar包中
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<mainClass>启动类路径</mainClass>
<includeSystemScope>true</includeSystemScope>
</configuration>
</plugin>
</plugins>
</build>