1. Install maven (omitted)
2. Download sdk from Alipay official website
https://doc.open.alipay.com/doc2/detail?treeId=54&articleId=103419&docType=1
alipay-sdk-java20151021120052.jar
3. Make a local installation package
Alipay-sdk-java20151021120052.jar is placed in the root directory of D: drive
Execute the command: cmd locates the D: drive
mvn install:install-file -DgroupId=com.alipay -DartifactId=sdk-Java -Dversion=20151021120052 -Dpackaging=jar -Dfile=alipay-sdk-java20151021120052.jar
Appears as shown in the figure above, indicating that the compilation is complete
[INFO] Installing D:\alipay-sdk-java20151021120052.jar to C:\Users\Computer\.m2\
repository\com\alipay\sdk-Java\20151021120052\sdk-java-20151021120052.jar
jar package location
Import method:
pom.xml added
<dependency>
<groupId>com.alipay</groupId>
<artifactId>sdk-java</artifactId>
<version>20151021120052</version>
</dependency>
Execute maven update to update to the project