jar位置如下图所示:
引用jar包,可以在pom中设置jar包路径
<dependency>
<groupId>examples</groupId>
<artifactId>examples</artifactId>
<version>1.3.1</version>
<scope>system</scope>
<systemPath>${project.basedir}/src/main/resources/libs/examples.jar</systemPath>
</dependency>
<dependency>
<groupId>jna</groupId>
<artifactId>jna</artifactId>
<version>1.3.1</version>
<scope>system</scope>
<systemPath>${project.basedir}/src/main/resources/libs/jna.jar</systemPath>
</dependency>
最后,在pom中设置下列属性
<build> <plugins> <plugin> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-maven-plugin</artifactId> <configuration> <includeSystemScope>true</includeSystemScope> </configuration> </plugin> </plugins> </build>