perf:调整阿里云短信,移除官方sdk
This commit is contained in:
@@ -23,6 +23,12 @@
|
||||
<groupId>com.tiesheng</groupId>
|
||||
<artifactId>tiesheng-web</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.aliyun</groupId>
|
||||
<artifactId>dysmsapi20170525</artifactId>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
<repositories>
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
package com.tiesheng.demo.controller;
|
||||
|
||||
import cn.hutool.json.JSONUtil;
|
||||
import com.tiesheng.annotation.token.TokenIgnore;
|
||||
import com.tiesheng.message.config.aliyun.AliyunSmsConfig;
|
||||
import com.tiesheng.message.pojos.MessageReqResp;
|
||||
import com.tiesheng.util.config.GlobalConfig;
|
||||
import com.tiesheng.util.pojos.ApiResp;
|
||||
@@ -19,8 +21,8 @@ public class TestController {
|
||||
|
||||
@Autowired
|
||||
GlobalConfig globalConfig;
|
||||
// @Autowired
|
||||
// AliyunSmsConfig aliyunSmsConfig;
|
||||
@Autowired
|
||||
AliyunSmsConfig aliyunSmsConfig;
|
||||
|
||||
@RequestMapping("/index")
|
||||
@TokenIgnore
|
||||
@@ -38,9 +40,9 @@ public class TestController {
|
||||
@RequestMapping("/send")
|
||||
@TokenIgnore
|
||||
public ApiResp<MessageReqResp> sendMessage() {
|
||||
// MessageReqResp reqResp = aliyunSmsConfig.sendSms("13567116463", "SMS_126361543",
|
||||
// JSONUtil.createObj().putOpt("code", "123456"));
|
||||
return ApiResp.respOK(new MessageReqResp());
|
||||
MessageReqResp reqResp = aliyunSmsConfig.sendSms("13567116463", "SMS_154950909",
|
||||
JSONUtil.createObj().putOpt("code", "123456"));
|
||||
return ApiResp.respOK(reqResp);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -25,4 +25,4 @@ tiesheng:
|
||||
aliyun:
|
||||
access-key-id: LTAI5tJtbgBCnTY5eS4SmrTf
|
||||
access-key-secret: JIHqpRUFffCHhXaJEVvWN31WcexWqG
|
||||
sign-name: 智慧校园
|
||||
sign-name: 阿里云短信测试
|
||||
|
||||
Reference in New Issue
Block a user