Spring Boot引入外部Jar
springboot 引入外部 jar 包并打包 - 乐子不痞 - 博客园 (cnblogs.com)
Jar存放位置
引入dependency
<dependency> <groupId>com.zebra.sdk</groupId> <artifactId>com.zebra.sdk</artifactId> <version>1.0.0</version> <scope>system</scope> <systemPath>${project.basedir}/lib/ZSDK_API.jar</systemPath> </dependency>
设置打包资源
<build> <resources> <resource> <directory>src/main/resources</directory> </resource> <resource> <directory>lib</directory> <targetPath>WEB-INF/lib</targetPath> <!-- 取符合格式的所有文件 *代表全部 --> <includes> <include>*.jar</include> </includes> </resource> </resources> </build>