没有合适的资源?快使用搜索试试~ 我知道了~
资源推荐
资源详情
资源评论
阿里云短信验证码获取
1.工具类生成验证码
2.短信验证码发送工具类
public class VerificationCodeUtil{
/**
* 六位随机数验证码
*/
public static String getVerificationCode() {
StringBuilder result = new StringBuilder();
Random random = new Random();
String[] str = {"0", "1", "2", "3", "4", "5", "6", "7",
"8", "9"};
for (int i = 0; i < 6; i++) {
result.append(str[random.nextInt(10)]);
}
return result.toString();
}
}
public class SmsUtil {
//阿里云服务KEYID
private static final String KEYID = "******************";
//阿里云服务SECRET
private static final String SECRET = "*******************";
/**
* 使用AK&SK初始化账号Client
*/
public static Client createClient(String accessKeyId, String
accessKeySecret) throws Exception {
Config config = new Config()
// 必填,您的 AccessKey ID
.setAccessKeyId(accessKeyId)
// 必填,您的 AccessKey Secret
资源评论
艳哥不秃头
- 粉丝: 302
- 资源: 12
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- 蓝桥杯2024年第十五届省赛真题-前缀总分
- com.qihoo.appstore_300101305-1.apk
- tensorflow-gpu-2.7.1-cp37-cp37m-manylinux2010-x86-64.whl
- tensorflow-2.7.2-cp37-cp37m-manylinux2010-x86-64.whl
- tensorflow-2.7.1-cp39-cp39-manylinux2010-x86-64.whl
- 蓝桥杯2024年第十五届省赛真题-传送阵
- com.qihoo.appstore_300101305.apk
- linux之线程同步一.doc
- keil5配色方案10种
- python烟花代码.doc
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功