spring boot引入外部jar包
第一步:新建libs目录,把jar包添加到libs目录下
maven中引入依赖,此时在IDEA中就可以正常运行项目了
但是此时打成jar包的项目,还没有把libs目录下的打进去,此时还需要在maven的配置文件中添加如下配置
第二步:添加打包配置
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<includeSystemScope>true</includeSystemScope>
</configuration>
</plugin>
</plugins>
</build>
这里主要是添加了如下代码,就能把libs目录下的jar包打进去了
<configuration>
<includeSystemScope>true</includeSystemScope>
</configuration>
其他博客参考:
https://blog.csdn.net/chenxidong9/article/details/79412585