博客
关于我
阿里云短信业务
阅读量: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 echo 输出 锘?... 乱码问题
    查看>>
    PHP empty、isset、isnull的区别
    查看>>
    ReferenceQueue的使用
    查看>>
    PHP FastCGI进程管理器PHP-FPM的架构
    查看>>
    referenceQueue用法
    查看>>
    Springboot处理跨域的方式(附Demo)
    查看>>
    php flush()刷新不能输出缓冲的原因分析
    查看>>
    Referenced classpath provider does not exist: org.maven.ide.eclipse.launchconfig
    查看>>
    Refactoring-Imporving the Design of Exsiting Code — 代码的坏味道
    查看>>
    PHP imap 远程命令执行漏洞复现(CVE-2018-19518)
    查看>>
    php include和require
    查看>>
    ref 和out 区别
    查看>>
    php JS 导出表格特殊处理
    查看>>
    php json dom解析
    查看>>
    ReentrantReadWriteLock读写锁解析
    查看>>
    php laravel实现依赖注入原理(反射机制)
    查看>>
    php laravel请求处理管道(装饰者模式)
    查看>>
    ReentrantReadWriteLock读写锁底层实现、StampLock详解
    查看>>
    PHP mongoDB 操作
    查看>>
    ReentrantLock读写锁
    查看>>