将下面redis
相关配置修改为你的redis
相关配置:
spring:
cache:
type: REDIS
redis:
host: 127.0.0.1
password: yueliminvc@outlook.com
port: 6379
database: 0
timeout: 3000ms
lettuce:
pool:
max-idle: 8
min-idle: 1
max-active: 8
max-wait: 30000ms
shutdown-timeout: 10000ms
将application.yml
文件中腾讯云配置部分修改为你的配置:
sms:
defaultExpire: 300
qcloud:
# your app id
appId: 000000
appKey: 'your_app_key'
templateId: 'your_sms_template'
sign: 'your_tencent_cloud_sms_sign'
# tencent sms api
url: 'https://yun.tim.qq.com/v5/tlssmssvr/sendsms'
获取验证码 http://127.0.0.1:52000/sms/tencent/generat/{effectiveTime}
参数effectiveTime
: 过期时间, 单位秒, 必选项
请求体:
{
"mobile": "15711111111"
}
返回值:
{
"code": 0,
"msg": "success",
"result": {
"key": "tencent:sms:?"
}
}
验证码校验 http://127.0.0.1:52000/sms/tencent/verification/{key}/{code}
参数key
: 生成的签名
参数code
: 生成的验证码
返回值:
{
"code": 0,
"msg": "success",
"result": true // true表示成功, false表示失败
}