maven加载本地jar包
添加引用,开发已经没有问题。
<dependency>
<groupId>org.bouncycastle</groupId>
<artifactId>bcpkix-jdk15on</artifactId>
<version>152</version>
<scope>system</scope>
<systemPath>${project.basedir}/src/main/resources/lib/xxxx.jar</systemPath>
</dependency>
打包如果是springboot项目,只需要配上includeSystemScope即可:
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<includeSystemScope>true</includeSystemScope>
</configuration>
</plugin>
<plugins>
</build>