Spring boot 引入lib包
2021-05-19 本文已影响0人
板栗炖牛肉
前言
- 特殊原因,不想把jar打入仓库
- 放在项目内,跟随上传
- 引用文章
解决方案
- 在根目录新建一个
lib
![](https://img.haomeiwen.com/i15473174/9deb8e2a3b7b6e2e.png)
-
pom.xml
中加入
...
<dependency>
<groupId>com.zhuozhengsoft</groupId>
<artifactId>pageoffice</artifactId>
//重点-开始
<scope>system</scope>
<systemPath>${project.basedir}/lib/pageoffice5.2.0.8.jar</systemPath>
//重点-结尾
<version>5.2.0.8</version>
</dependency>
</dependencies>
- 修改打包插件
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
//重点-开始
<configuration>
<includeSystemScope>true</includeSystemScope>
</configuration>
//重点-结尾
</plugin>
</plugins>
</build>
- 完成
![](https://img.haomeiwen.com/i15473174/11c0ad97098cc84a.png)
Ps
- 其他原因不想打包
<scope>system</scope>
的jar包,百度配置