一般我们在开发中,可能会遇到一些在Maven仓库没有的包,或者自定义的一些jar包,这个时候就需要引入外部jar包,来实现我们自己的需求,那具体怎么玩呢? 根据经验我总结一下。
1.首先在项目根目录建立文件夹,放入jar包
2.maven引入jar包
<dependency>
<groupId>de.schlichtherle.truelicense</groupId>
<artifactId>truelicense-core</artifactId>
<version>1.33</version>
<type>jar</type>
<scope>system</scope>
<systemPath>${pom.basedir}/lib/truelicense-core-1.33.jar</systemPath>
</dependency>
3.maven插件配置
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<includeSystemScope>true</includeSystemScope>
</configuration>
</plugin>
4.收尾打个包
完活