有些类库我们会放在本地resources目录,当然如果公用仓库里有它,并且是免费的,还是建议直接引用仓库里的,这样在版本更新上和源代码体积上都是有优势的,下面解决引用本地jar的方法。

资源文件
/resources/lib/abc.jar
在pom里添加引用
<dependencies> <dependency> <groupId>com.bdyh.common</groupId>
<artifactId>common</artifactId> <version>0.0.1</version> <scope>system</scope>
<systemPath>${project.basedir}/src/main/resources/lib/aspose-words-15.8.0-jdk16.jar</systemPath>
</dependency> </dependencies>
pom里添加本地文件支持
<build> <plugins> <plugin> <groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId> <configuration>
<includeSystemScope>true</includeSystemScope> </configuration> </plugin>
</plugins> </build>
这样,本地的jar包就算了引到项目里了。

友情链接
KaDraw流程图
API参考文档
OK工具箱
云服务器优惠
阿里云优惠券
腾讯云优惠券
华为云优惠券
站点信息
问题反馈
邮箱:ixiaoyang8@qq.com
QQ群:637538335
关注微信