1.带入maven依赖
<dependency>
<groupId>com.aliyun</groupId>
<artifactId>aliyun-java-sdk-core</artifactId>
<version>4.0.8</version>
</dependency>
<dependency>
<groupId>com.aliyun</groupId>
<artifactId>aliyun-java-sdk-dysmsapi</artifactId>
<version>1.1.0</version>
</dependency>
<!-- https://mvnrepository.com/artifact/com.google.code.gson/gson -->
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
<version>2.8.4</version>
</dependency>
2.代码
public class SmsManager {
//替换成你的AK
private final static String accessKeyId = "XXXXXXXXXXXX"; //你的accessKeyId
private final static String accessKeySecret = "XXXXXXXXXXXXXXXXXXX"; //你的acce