# 华为云SMS
# 核心配置
# Yaml配置
# ========================= Haichuang Setting =========================
haichuang:
sdk:
huaweicloudsms:
# AppKey
app-key: xxx
# AppSecret
app-secret: xxx
# AppUrl
app-url: xxx
# 默认短信签名, 可为空
default-sign-name: xxx
# 默认通道号, 可为空
default-channel-number: xxx
# 默认模版ID, 可为空
default-template-id: xxx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
# 核心Service
# HuaWeiCloudSmsService (opens new window)
全限定名:pro.haichuang.framework.sdk.huaweicloudsms.service.HuaWeiCloudSmsService (opens new window)
华为云SMS核心Service
该类为华为云SMS核心Service,封装了常用的方法
警告
所有SMS相关操作必须使用HuaWeiCloudSmsService接口
# DefaultHuaWeiCloudSmsServiceImpl (opens new window)
华为云SMS核心Service默认实现
该类为华为云SMS核心Service默认实现,已默认注入到Spring中,支持自定义实现(需要手动注入到Spring中)
# 核心工具类
# HuaWeiCloudSmsUtils (opens new window)
全限定名:pro.haichuang.framework.sdk.huaweicloudsms.util.HuaWeiCloudSmsUtils (opens new window)
华为云SMS工具类
该类为华为云SMS工具类,基于第三方二次封装,推荐使用HuaWeiCloudSmsService进行操作
# 👇Example👇
@RestController
@RequestMapping("/test")
public class TestController {
@Autowired
private HuaWeiCloudSmsService aliYunSmsService;
......
}
1
2
3
4
5
6
7
8
9
2
3
4
5
6
7
8
9