1. 在pom中配置依赖
<dependency>
<groupId>com.demo.dbct.log</groupId>
<artifactId>dbct-log-client-starter</artifactId>
<version>1.0.0-SNAPSHOT</version>
<scope>system</scope>
<systemPath>D:/repository/lib/dbct-log-client-starter-1.0.0-SNAPSHOT.jar</systemPath>
</dependency>
2. 避免团队的其他成员使用不了
调整:jar包放到项目里,路径改为相对路径:
<systemPath>${project.basedir}/lib/dbct-log-client-starter-1.0.0-SNAPSHOT.jar</systemPath>
3. spring-boot打包插件是不会将本地依赖jar文件打进部署包
<configuration>
<includeSystemScope>true</includeSystemScope>
</configuration>
或则: 指定打包对应路径下内容,及打包后的路径
<resources>
<!-- 指定sdk打包后的路径 -->
<resource>
<directory>/lib</directory>
<targetPath>BOOT-INF/lib/</targetPath>
<includes>
<include>**/*.jar</include>
</includes>
</resource>
</resources>