1、先把jar包放目录下并add as libary
2、在pom.xml中加入
<!--添加的本地的外部jar包依赖-->
<dependency>
<!--groupId、artifactId、version为自定义,groupId与artifactId但是不能重名-->
<groupId>JNative</groupId>
<artifactId>JNative</artifactId>
<version>1.0</version>
<scope>system</scope>
<systemPath>${pom.basedir}/lib/JNative.jar</systemPath>
</dependency>
3、pom.xml中加入
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<includeSystemScope>true</includeSystemScope>
</configuration>
<executions>
<execution>
<phase>none</phase>
</execution>
</executions>
</plugin>
</plugins>
</build>
4、build clean run 即可