博客
关于我
阿里云短信业务
阅读量:343 次
发布时间:2019-03-04

本文共 1500 字,大约阅读时间需要 5 分钟。

???????????

??????

  • ????
    • ????
    • ????
    • ????
    1. ????
      • ????
      • ?????
      1. Redis??
        • ????
        • ????

        ??????

      2. ??????
        • ??????????
          • ?????TemplateCode?
          • ?????SignName?
          • ??????PhoneNumbers?
          • ????????TemplateParam?
        1. ????
        2. public class SendSms {    public static void main(String[] args) {        // 1. ?????????        DefaultProfile profile = DefaultProfile.getProfile("cn-hangzhou", "your-ak", "your-sk");        IAcsClient client = new DefaultAcsClient(profile);        // 2. ??????        CommonRequest request = new CommonRequest();        request.setSysMethod(MethodType.POST);        request.setSysDomain("dysmsapi.aliyuncs.com");        request.setSysVersion("2017-05-25");        request.setSysAction("SendSms");        // 3. ???????        String code = UUID.randomUUID().toString().replaceAll("-", "").substring(0, 4);        // 4. ??????        request.putQueryParameter("PhoneNumbers", "1771x34xxxx");        request.putQueryParameter("SignName", "?xx???");        request.putQueryParameter("TemplateCode", "your-TemplateCode");        request.putQueryParameter("TemplateParam", JSONObject.toJSONString(code));        try {            CommonResponse response = client.getCommonResponse(request);            System.out.println(response.getData());        } catch (ServerException e) {            e.printStackTrace();        } catch (ClientException e) {            e.printStackTrace();        }    }}

          ??????

        3. Redis????
          • Redis?????
          • 5??????
          • ??????
          1. ????
            • Maven????
            • ??????
            1. ????
              • Spring Boot??
              • RedisTemplate

              ???????????????????????????????

    转载地址:http://ghbe.baihongyu.com/

    你可能感兴趣的文章
    python语音播放
    查看>>
    python语言:装饰器原理
    查看>>
    Python 交互式数据可视化详解
    查看>>
    python语言有哪些优点和缺点_Python有哪些优缺点,你了解吗?
    查看>>
    Python 从入门到精通:30天速成教程到底有多狠?你能坚持下来吗?
    查看>>
    Python 从数据库中存储和检索密码的最安全方法
    查看>>
    Python语言及其应用 - 知识点遍历
    查看>>
    Python 优化提速的 8 个小技巧
    查看>>
    Python 余弦相似度与皮尔逊相关系数 计算
    查看>>
    python 使用execjs 报编码错误解决办法,UnicodeDecodeError: ‘gbk‘ codec can‘t decode byte 0xac in position 145: il
    查看>>
    python 使用filetype校验文件
    查看>>
    Python 使用flush函数将缓冲区数据立即写磁盘
    查看>>