阿里云短信服务sdk api示例的方法失效的解决方案
CommonRequest request = new CommonRequest(); request.setSysMethod(MethodType.POST); request.setSysDomain("dysmsapi.aliyuncs.com"); request.setSysVersion("2017-05-25"); request.setSysAction("SendSms");
通过查看 CommonRequest类即可发现,方法名全部去除了Sys前缀,所以改成如下代码即可:
CommonRequest request = new CommonRequest(); request.setMethod(MethodType.POST); request.setDomain("dysmsapi.aliyuncs.com"); request.setVersion("2017-05-25"); request.setAction("SendSms");