From 32d0d81e3837d37d8138cf3608757089c3f7e5d0 Mon Sep 17 00:00:00 2001 From: jianjun Date: Fri, 17 Sep 2021 14:23:35 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8E=A5=E5=85=A5=E7=9F=AD=E4=BF=A1=E9=85=8D?= =?UTF-8?q?=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../interceptor/AuthorizationInterceptor.java | 7 +++-- .../src/main/resources/application-dev.yml | 27 +++++++++---------- .../src/main/resources/application-prod.yml | 20 +++++++++----- .../src/main/resources/application-test.yml | 20 +++++++++----- tduck-api/src/main/resources/application.yml | 6 ----- 5 files changed, 42 insertions(+), 38 deletions(-) diff --git a/tduck-api/src/main/java/com/tduck/cloud/api/web/interceptor/AuthorizationInterceptor.java b/tduck-api/src/main/java/com/tduck/cloud/api/web/interceptor/AuthorizationInterceptor.java index 0316793..8e95ae2 100644 --- a/tduck-api/src/main/java/com/tduck/cloud/api/web/interceptor/AuthorizationInterceptor.java +++ b/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; } diff --git a/tduck-api/src/main/resources/application-dev.yml b/tduck-api/src/main/resources/application-dev.yml index afe927f..24c6f5b 100644 --- a/tduck-api/src/main/resources/application-dev.yml +++ b/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={} diff --git a/tduck-api/src/main/resources/application-prod.yml b/tduck-api/src/main/resources/application-prod.yml index 7eb5fb0..39fac40 100644 --- a/tduck-api/src/main/resources/application-prod.yml +++ b/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={} diff --git a/tduck-api/src/main/resources/application-test.yml b/tduck-api/src/main/resources/application-test.yml index b8cc823..0f0a5ac 100644 --- a/tduck-api/src/main/resources/application-test.yml +++ b/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={} diff --git a/tduck-api/src/main/resources/application.yml b/tduck-api/src/main/resources/application.yml index 13bd071..6ebb563 100644 --- a/tduck-api/src/main/resources/application.yml +++ b/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