博客
关于我
阿里云短信业务
阅读量: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 中Semaphore 信号量对象、Event事件、Condition
    查看>>
    python 中with的使用及样例
    查看>>
    python读取wav文件并播放[pyaudio/wave]
    查看>>
    python读取txt文件的行数
    查看>>
    Python 中内置的最大堆 API
    查看>>
    Python 中只有一个 True 和一个 False 对象吗?
    查看>>
    python读取mtcars数据集并实现以下操作_关于数据处理。。,Python交流,技术交流区,鱼C论坛 - Powered by Discuz!...
    查看>>
    Python 中多线程与多处理之间的区别
    查看>>
    Python 中如何使用 lambda 函数
    查看>>
    Python 中如何创建多行字符串?
    查看>>
    Python 中如何处理异常?
    查看>>
    Python 中如何实现列表的切片?
    查看>>
    Python 中如何实现字典的排序?
    查看>>
    Python 中常用的数据类型及相关操作详解
    查看>>
    python 中文乱码
    查看>>
    Python 中生成器与普通函数的区别
    查看>>
    Python 中的 *tuple 和 **dict 是什么意思?
    查看>>
    Python 中的 filter() 函数:筛选可迭代对象元素
    查看>>
    Python 中的 Pillow 不允许我打开图像(“超出限制“)
    查看>>
    Python 中的 threading 模块和 multiprocessing 模块有何区别?
    查看>>