博客
关于我
阿里云短信业务
阅读量: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/

    你可能感兴趣的文章
    php与web服务器关系
    查看>>
    redis事务操作
    查看>>
    php中0,空,null和false的区别
    查看>>
    PHP中array_merge和array相加的区别分析
    查看>>
    PHP中Closure::bindTo的用法分析
    查看>>
    php中curl得使用
    查看>>
    PHP中curl特性
    查看>>
    PHP中date时间不对
    查看>>
    PHP中dirname(__FILE__)的意思
    查看>>
    PHP中extract()函数的妙用
    查看>>
    PHP中fileinfo的作用以及怎么开启fileinfo
    查看>>
    PHP中file_get_contents如何带上cookies
    查看>>
    PHP中header的作用
    查看>>
    PHP中implode()和explode()
    查看>>
    PHP中ob系列函数讲解(浏览器缓存技术)
    查看>>
    PHP中serialize和json序列化与反序列化的区别
    查看>>
    Redis事务处理
    查看>>
    php中传值与传引用的区别是什么
    查看>>
    php中使用ajax进行前后端json数据交互
    查看>>
    Redis事务和锁操作
    查看>>