控制器配置说明

1.启用controller配置项

1
2
3
4
5
6
7
8
sms:
web:
enable: true ##启用web端点
base-path: /commons/sms ##访问路径前缀
enable-send: true ##是否启用验证码发送web端点
enable-get: true ##是否启用验证码查询web端点
enable-verify: true ##是否启用验证码验证web端点
enable-notice: true ##是否启用通知发送web端点

2.路径映射关系

以下地址以/commons/sms作为路径前缀

路径 请求方法 说明
/commons/sms/verificationCode/{phone} POST 给指定号码发送验证码
/commons/sms/verificationCode/{phone} GET 获取指定号码的验证码信息
/commons/sms/verificationCode POST 验证验证码是否有效
/commons/sms/notice POST 发送短信通知

3.controller的实现类地址

/guerlab-sms-server-starter/src/main/java/net/guerlab/sms/server/controller/SmsController.java

可根据业务需求自行实现