Springboot加载第三方jar包pom.xml配置

544 阅读1分钟
  1. 将第三方jar放到src/main/webapp/WEB-INF/lib/目录下面
  2. 配置pom.xml 添加如下信息

<!--第三方依赖-->

<dependency>

<groupId>com.taobao</groupId>

<artifactId>sdk-java</artifactId>

<scope>system</scope>

<version>1.1.1</version>

<systemPath>${basedir}/src/main/webapp/WEB-INF/lib/taobao-sdk.jar</systemPath>

</dependency>


<build>

<plugins>

<plugin>

<groupId>org.springframework.boot</groupId>

<artifactId>spring-boot-maven-plugin</artifactId>

<configuration>

<source>1.8</source>

<target>1.8</target>

<encoding>UTF-8</encoding>

<compilerArguments>

<extdirs>${basedir}/src/main/webapp/WEB-INF/lib</extdirs>

</compilerArguments>

<fork>true</fork>

<includeSystemScope>true</includeSystemScope>

</configuration>

</plugin>

</plugins>

</build>

具体大家可以参考下面这篇文章讲解的非常详细

blog.csdn.net/chenxidong9…