From 3ab6d4dc613d90c17ebf68771e9dbfc02c33c929 Mon Sep 17 00:00:00 2001 From: "sin-ning@aliyun.com" Date: Mon, 27 May 2019 22:37:12 +0800 Subject: [PATCH] =?UTF-8?q?-=20=E7=9F=AD=E4=BF=A1=20key=20=E5=80=BC?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=20default=5Fvalue?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/cn/iocoder/mall/admin/client/SmsAliYunClient.java | 4 ++-- .../java/cn/iocoder/mall/admin/client/SmsYunPianClient.java | 2 +- .../src/main/resources/config/application.yaml | 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/system/system-service-impl/src/main/java/cn/iocoder/mall/admin/client/SmsAliYunClient.java b/system/system-service-impl/src/main/java/cn/iocoder/mall/admin/client/SmsAliYunClient.java index 54e879c6..745e4ce6 100644 --- a/system/system-service-impl/src/main/java/cn/iocoder/mall/admin/client/SmsAliYunClient.java +++ b/system/system-service-impl/src/main/java/cn/iocoder/mall/admin/client/SmsAliYunClient.java @@ -25,9 +25,9 @@ import java.util.Map; @Component public class SmsAliYunClient implements SmsClient { - @Value("${sms.aliYun.accessKeyId}") + @Value("${sms.aliYun.accessKeyId?:'default_value'}") private String accessKeyId; - @Value("${sms.aliYun.accessSecret}") + @Value("${sms.aliYun.accessSecret?:'default_value'}") private String accessSecret; private static final String DOMAIN = "dysmsapi.aliyuncs.com"; diff --git a/system/system-service-impl/src/main/java/cn/iocoder/mall/admin/client/SmsYunPianClient.java b/system/system-service-impl/src/main/java/cn/iocoder/mall/admin/client/SmsYunPianClient.java index 98f857c9..38c87d60 100644 --- a/system/system-service-impl/src/main/java/cn/iocoder/mall/admin/client/SmsYunPianClient.java +++ b/system/system-service-impl/src/main/java/cn/iocoder/mall/admin/client/SmsYunPianClient.java @@ -91,7 +91,7 @@ public class SmsYunPianClient implements SmsClient { //编码格式。发送编码格式统一用UTF-8 private static String ENCODING = "UTF-8"; - @Value("${sms.yunPian.apiKey}") + @Value("${sms.yunPian.apiKey?:'default_value'}") private String apiKey; @Override diff --git a/system/system-service-impl/src/main/resources/config/application.yaml b/system/system-service-impl/src/main/resources/config/application.yaml index 2d031346..6236180c 100644 --- a/system/system-service-impl/src/main/resources/config/application.yaml +++ b/system/system-service-impl/src/main/resources/config/application.yaml @@ -27,10 +27,10 @@ mybatis-plus: # sms sms: yunPian: - apiKey: ${YUN_PIAN} + apiKey: aliYun: - accessKeyId: ${ALI_YUN_KEY_ID} - accessSecret: ${ALI_YUN_SECRET} + accessKeyId: + accessSecret: # dubbo dubbo: