springboot 引入第三方jar 防在resource路徑下 釋出伺服器提示 class not found
阿新 • • 發佈:2020-12-13
技術標籤:SpringBoot
1、新增引用
<dependency> <groupId>com.openapi</groupId> <artifactId>sdk</artifactId> <version>6.0</version> <scope>system</scope> <systemPath>${basedir}/src/main/resources/lib/openapi-sdk-6.0.jar</systemPath> </dependency>
2、添加發布補充說明
<build> <resources> <resource> <directory>${basedir}/src/main/resources/lib</directory> <targetPath>BOOT-INF/lib/</targetPath> <includes> <include>**/*.jar</include> </includes> </resource> <resource> <directory>src/main/resources</directory> <targetPath>BOOT-INF/classes/</targetPath> </resource> </resources> </build>