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

    你可能感兴趣的文章
    ParseChat应用源码ios版
    查看>>
    Part 2异常和错误
    查看>>
    Spring @Async执行异步方法的简单使用
    查看>>
    PAT 1027 Colors in Mars
    查看>>
    PAT 1127 ZigZagging on a Tree[难]
    查看>>
    PAT 2-07. 素因子分解(20)
    查看>>
    PAT-1044. Shopping in Mars (25)
    查看>>
    PAT-乙级-1040 有几个PAT
    查看>>
    PAT1093 Count PAT's (25)(逻辑题)
    查看>>
    PATA1038题解(需复习)
    查看>>
    Patching Array
    查看>>
    Path does not chain with any of the trust anchors
    查看>>
    Path形状获取字符串型变量数据
    查看>>
    PAT甲级——1001 A+B Format (20分)
    查看>>
    Skywalking原理
    查看>>
    PAT甲级——1006 Sign In and Sign Out (25分)
    查看>>
    PAT甲级——1007 Maximum Subsequence Sum (25分)
    查看>>
    PAT甲级——1009 Product of Polynomials (25分)(最后一个测试点段错误)
    查看>>
    Spring对jdbc的支持
    查看>>
    PayPal网站付款标准版(for PHP)
    查看>>