groupId 和 artifactId 和version 随便填就可以了,引用的时候就需要导入groupId
<scope>system</scope>
是设置类型,
${project.basedir}
是Maven内置变量,可取到项目根路径,后面就跟着包的绝对路径
<dependency>
<groupId>com.alipay</groupId>
<artifactId>alipay-sdk</artifactId>
<version>20221027</version>
<scope>system</scope>
<systemPath>${project.basedir}/src/main/resources/alipay-sdk-java20221027.jar</systemPath>
</dependency>
Spring Boot项目在pom.xml
的<build> 的<plugins>
中添加如下配置
includeSystemScope 标识引入扫系统域的jar包
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<includeSystemScope>true</includeSystemScope>
</configuration>
</plugin>