添加依赖
把本地依赖的jar包放在resources下的lib目录中。
<dependency>
<groupId>com.test</groupId>
<artifactId>test-utils</artifactId>
<version>1.0.0-SNAPSHOT</version>
<scope>system</scope>
<systemPath>${project.basedir}/src/main/resources/lib/test-utils-1.0.0.jar</systemPath>
</dependency>
修改配置
Spring Boot插件添加<includeSystemScope>true</includeSystemScope>配置。
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<includeSystemScope>true</includeSystemScope>
</configuration>
</plugin>
</plugins>
网友评论