Browse Source

接入短信配置

dev
jianjun 4 years ago
parent
commit
32d0d81e38
  1. 7
      tduck-api/src/main/java/com/tduck/cloud/api/web/interceptor/AuthorizationInterceptor.java
  2. 27
      tduck-api/src/main/resources/application-dev.yml
  3. 20
      tduck-api/src/main/resources/application-prod.yml
  4. 20
      tduck-api/src/main/resources/application-test.yml
  5. 6
      tduck-api/src/main/resources/application.yml

7
tduck-api/src/main/java/com/tduck/cloud/api/web/interceptor/AuthorizationInterceptor.java

@ -32,8 +32,9 @@ public class AuthorizationInterceptor extends HandlerInterceptorAdapter {
private void init(){
skipUrlList = new ArrayList<>();
skipUrlList.add("/tduck-api/captcha/get");
skipUrlList.add("/tduck-api/captcha/check*");
skipUrlList.add("/tduck-api/login/account*");
skipUrlList.add("/tduck-api/captcha/check");
skipUrlList.add("/tduck-api/login/account");
skipUrlList.add("/tduck-api/register/phone/code");
}
public AuthorizationInterceptor(JwtUtils jwtUtils) {
@ -55,7 +56,6 @@ public class AuthorizationInterceptor extends HandlerInterceptorAdapter {
String requestURI = request.getRequestURI();
if (isSkip(requestURI)){
System.out.println("=====skip=====url"+requestURI);
return true;
}else {
System.out.println("==========url"+requestURI);
@ -101,7 +101,6 @@ public class AuthorizationInterceptor extends HandlerInterceptorAdapter {
private boolean isSkip(String url){
for (String skipurl : skipUrlList) {
System.out.println(antPathMatcher.match(skipurl, url)+",path"+url+",skipurl:"+skipurl);
if (antPathMatcher.match(skipurl, url)){
return true;
}

27
tduck-api/src/main/resources/application-dev.yml

@ -25,6 +25,12 @@ spring:
max-wait: -1ms # 连接池最大阻塞等待时间(使用负值表示没有限制)
max-idle: 10 # 连接池中的最大空闲连接
min-idle: 5 # 连接池中的最小空闲连接
cloud:
nacos:
discovery:
server-addr: 192.168.1.140:8848
namespace: 1fecc730-5e6e-464c-aae9-7567944e7936
register-enabled: true
mail:
host: smtp.exmail.qq.com
username: mpw:9jwi2HILb4x+eVy2fA0SYeits0G3qlm/YajJdX0OKQU=
@ -43,13 +49,6 @@ logging:
config: classpath:logback-spring.xml
platform:
# oss:
# ossType: 1
# endpoint: 12
# accessKeyId: mpw:vT2DiLH0raFqd2+10sAGbvhyYQsWKuxj2YOnXAh+ZhAsMkhqcQBSa5tQosuposvs
# accessKeySecret: mpw:ZRJuLL9+aiBq+9PUN3wjrglLNvuK2yhKhrnSzw5P36P/E9QP4EIOIObeQvYjpaV/
# bucketName: tduck-cloud
# domain: https://qiniu.smileyi.top
oss:
ossType: 0
endpoint: oss-cn-qingdao.aliyuncs.com
@ -58,13 +57,13 @@ platform:
bucketName: elink-esua-epdc
domain: https://elink-esua-epdc.oss-cn-qingdao.aliyuncs.com
sms:
type: 1 # 短信平台类型
secretId: mpw:EvC1LR0eGdzeQzkuO7fhEazxGtmdue8FJDzSA1l+gICuOUEDXI8zcjK+VXB2aWKS
secretKey: mpw:W3kvWxvHdgUJPAwqR6mwpfMoQMerAYcxZGHwJc259lK3m+jzceGuu0Tgnx++02Bk
appId: 1400461467
sign: smileyi知识分享
validateCodeTemplateId: 808150
retrievePwdValidateCodeTemplateId: 809014
type: 0 # 短信平台类型
secretId: LTAI4G5KMmkxpix924ddeVNM
secretKey: 92nB7g5L1JmBGSzZG5xsdGvfv9O8WX
sign: 党群e事通
validateCodeTemplateId: SMS_150731394
retrievePwdValidateCodeTemplateId: #腾讯云使用的
appId: #腾讯云使用的
front:
baseUrl: http://localhost:8888/
resetPwdUrl: http://localhost:8888/forget/password?code={}&email={}

20
tduck-api/src/main/resources/application-prod.yml

@ -25,6 +25,12 @@ spring:
max-wait: -1ms # 连接池最大阻塞等待时间(使用负值表示没有限制)
max-idle: 10 # 连接池中的最大空闲连接
min-idle: 5 # 连接池中的最小空闲连接
cloud:
nacos:
discovery:
server-addr: 192.168.10.180:8848
namespace: bd205d23-e696-47be-b995-916313f86e99
register-enabled: true
mail:
host: smtp.163.com
username: test@163.com # 邮箱账号
@ -58,13 +64,13 @@ platform:
upload-folder: /home/tduck/profile #文件存放的位置
access-path-pattern: /profile/** # 文件访问路径前缀 这里更改domain也需要更改
sms:
type: 1 # 短信平台类型
secretId: Ga2AIryi8174KXz #短信秘钥
secretKey: uHSpKfjtadadaezjwtN6B0dvbelv #短信秘钥
appId:
sign: tduck #短信签名
validateCodeTemplateId: SMS_219865038 #验证码模板
retrievePwdValidateCodeTemplateId: SMS_219865039 # 找回密码模板
type: 0 # 短信平台类型
secretId: LTAI4G5KMmkxpix924ddeVNM
secretKey: 92nB7g5L1JmBGSzZG5xsdGvfv9O8WX
sign: 党群e事通
validateCodeTemplateId: SMS_150731394
retrievePwdValidateCodeTemplateId: #腾讯云使用的
appId: #腾讯云使用的
front:
baseUrl: https://demo.tduckapp.com/
resetPwdUrl: https://demo.tduckapp.com/forget/password?code={}&email={}

20
tduck-api/src/main/resources/application-test.yml

@ -25,6 +25,12 @@ spring:
max-wait: -1ms # 连接池最大阻塞等待时间(使用负值表示没有限制)
max-idle: 10 # 连接池中的最大空闲连接
min-idle: 5 # 连接池中的最小空闲连接
cloud:
nacos:
discovery:
server-addr: 192.168.10.150:8848
namespace: 67e3c350-533e-4d7c-9f8f-faf1b4aa82ae
register-enabled: true
mail:
host: smtp.exmail.qq.com
username: mpw:9jwi2HILb4x+eVy2fA0SYeits0G3qlm/YajJdX0OKQU=
@ -51,13 +57,13 @@ platform:
bucketName: elink-esua-epdc
domain: https://elink-esua-epdc.oss-cn-qingdao.aliyuncs.com
sms:
type: 1 # 短信平台类型
secretId: mpw:EvC1LR0eGdzeQzkuO7fhEazxGtmdue8FJDzSA1l+gICuOUEDXI8zcjK+VXB2aWKS
secretKey: mpw:W3kvWxvHdgUJPAwqR6mwpfMoQMerAYcxZGHwJc259lK3m+jzceGuu0Tgnx++02Bk
appId: 1400461467
sign: smileyi知识分享
validateCodeTemplateId: 808150
retrievePwdValidateCodeTemplateId: 809014
type: 0 # 短信平台类型
secretId: LTAI4G5KMmkxpix924ddeVNM
secretKey: 92nB7g5L1JmBGSzZG5xsdGvfv9O8WX
sign: 党群e事通
validateCodeTemplateId: SMS_150731394
retrievePwdValidateCodeTemplateId: #腾讯云使用的
appId: #腾讯云使用的
front:
baseUrl: http://localhost:8888/
resetPwdUrl: http://localhost:8888/forget/password?code={}&email={}

6
tduck-api/src/main/resources/application.yml

@ -14,12 +14,6 @@ spring:
multipart:
max-file-size: 100MB
max-request-size: 100MB
cloud:
nacos:
discovery:
server-addr: 192.168.1.140:8848
namespace: 1fecc730-5e6e-464c-aae9-7567944e7936
register-enabled: true
server:
port: 8116

Loading…
Cancel
Save