mirror of https://gitee.com/stylefeng/roses
【captcha】更新sql和默认装配值
parent
d413d70bb3
commit
26b77b3e34
|
@ -25,4 +25,9 @@ public interface SmsConstants {
|
|||
*/
|
||||
String SMS_CODE_PARAM_NAME = "code";
|
||||
|
||||
/**
|
||||
* 默认短信失效时间(单位:秒)
|
||||
*/
|
||||
Integer DEFAULT_SMS_INVALID_SECONDS = 300;
|
||||
|
||||
}
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
package cn.stylefeng.roses.kernel.sms.api.expander;
|
||||
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import cn.stylefeng.roses.kernel.config.api.context.ConfigContext;
|
||||
import cn.stylefeng.roses.kernel.sms.api.constants.SmsConstants;
|
||||
|
||||
/**
|
||||
* 短信相关的配置拓展
|
||||
|
@ -19,7 +21,7 @@ public class SmsConfigExpander {
|
|||
* @date 2020/10/26 22:09
|
||||
*/
|
||||
public static Integer getSmsValidateExpiredSeconds() {
|
||||
return ConfigContext.me().getSysConfigValueWithDefault("SYS_SMS_VALIDATE_EXPIRED_SECONDS", Integer.class, 300);
|
||||
return ConfigContext.me().getSysConfigValueWithDefault("SYS_SMS_VALIDATE_EXPIRED_SECONDS", Integer.class, SmsConstants.DEFAULT_SMS_INVALID_SECONDS);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -29,7 +31,7 @@ public class SmsConfigExpander {
|
|||
* @date 2020/12/1 21:20
|
||||
*/
|
||||
public static String getAliyunSmsAccessKeyId() {
|
||||
return ConfigContext.me().getConfigValue("SYS_ALIYUN_SMS_ACCESS_KEY_ID", String.class);
|
||||
return ConfigContext.me().getSysConfigValueWithDefault("SYS_ALIYUN_SMS_ACCESS_KEY_ID", String.class, StrUtil.EMPTY);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -39,7 +41,7 @@ public class SmsConfigExpander {
|
|||
* @date 2020/12/1 21:20
|
||||
*/
|
||||
public static String getAliyunSmsAccessKeySecret() {
|
||||
return ConfigContext.me().getConfigValue("SYS_ALIYUN_SMS_ACCESS_KEY_SECRET", String.class);
|
||||
return ConfigContext.me().getSysConfigValueWithDefault("SYS_ALIYUN_SMS_ACCESS_KEY_SECRET", String.class, StrUtil.EMPTY);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -49,7 +51,7 @@ public class SmsConfigExpander {
|
|||
* @date 2020/12/1 21:20
|
||||
*/
|
||||
public static String getAliyunSmsSignName() {
|
||||
return ConfigContext.me().getConfigValue("SYS_ALIYUN_SMS_SIGN_NAME", String.class);
|
||||
return ConfigContext.me().getSysConfigValueWithDefault("SYS_ALIYUN_SMS_SIGN_NAME", String.class, StrUtil.EMPTY);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -159,6 +159,9 @@ INSERT INTO `sys_config` VALUES (40, 'druid web url统计的session名称', 'SYS
|
|||
INSERT INTO `sys_config` VALUES (41, 'druid web url统计的session最大监控数', 'SYS_DRUID_WEB_STAT_FILTER_SESSION_STAT_MAX_COUNT', '1000', 'Y', NULL, 1, 'sys_config', 'N', NULL, NULL, NULL, NULL);
|
||||
INSERT INTO `sys_config` VALUES (42, 'druid web url统计的cookie名称', 'SYS_DRUID_WEB_STAT_FILTER_PRINCIPAL_COOKIE_NAME', 'Authorization', 'Y', NULL, 1, 'sys_config', 'N', NULL, NULL, NULL, NULL);
|
||||
INSERT INTO `sys_config` VALUES (43, 'druid web url统计的是否开启监控单个url调用的sql列表', 'SYS_DRUID_WEB_STAT_FILTER_PROFILE_ENABLE', 'true', 'Y', NULL, 1, 'sys_config', 'N', NULL, NULL, NULL, NULL);
|
||||
INSERT INTO `sys_config` VALUES (33, '阿里云短信的accessKeyId', 'SYS_ALIYUN_SMS_ACCESS_KEY_ID', '你的accessKeyId', 'Y', NULL, 1, 'sms_config', 'N', NULL, NULL, NULL, NULL);
|
||||
INSERT INTO `sys_config` VALUES (34, '阿里云短信的accessKeySecret', 'SYS_ALIYUN_SMS_ACCESS_KEY_SECRET', '你的secret', 'Y', NULL, 1, 'sms_config', 'N', NULL, NULL, NULL, NULL);
|
||||
INSERT INTO `sys_config` VALUES (35, '阿里云短信的签名', 'SYS_ALIYUN_SMS_SIGN_NAME', '签名名称', 'Y', NULL, 1, 'sms_config', 'N', NULL, NULL, NULL, NULL);
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for sys_database_info
|
||||
|
|
Loading…
Reference in New Issue