Cannot resolve com.alipay:alipay-sdk

有时候打开别人的项目回遇到maven或者IDEA提示这个错误

解决办法:删除pom文件中旧的关于alipay-sdk的依赖,添加新的相关依赖,参考https://mvnrepository.com/artifact/com.alipay.sdk/alipay-sdk-java

 

<!– https://mvnrepository.com/artifact/com.alipay.sdk/alipay-sdk-java –>
<dependency>
<groupId>com.alipay.sdk</groupId>
<artifactId>alipay-sdk-java</artifactId>
<version>3.4.49.ALL</version>
</dependency>