mirror of
https://github.com/dromara/RuoYi-Vue-Plus.git
synced 2025-11-13 12:43:44 +08:00
reset !pr324 有逻辑性问题 暂时回滚
This commit is contained in:
@@ -62,6 +62,11 @@ public interface Constants {
|
||||
*/
|
||||
String LOGIN_FAIL = "Error";
|
||||
|
||||
/**
|
||||
* 验证码有效期(分钟)
|
||||
*/
|
||||
Integer CAPTCHA_EXPIRATION = 2;
|
||||
|
||||
/**
|
||||
* 令牌
|
||||
*/
|
||||
|
||||
@@ -6,6 +6,7 @@ import com.ruoyi.common.sms.core.SmsTemplate;
|
||||
import com.ruoyi.common.sms.core.TencentSmsTemplate;
|
||||
import org.springframework.boot.autoconfigure.AutoConfiguration;
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
|
||||
import org.springframework.boot.context.properties.EnableConfigurationProperties;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
@@ -21,6 +22,7 @@ import org.springframework.context.annotation.Configuration;
|
||||
public class SmsConfig {
|
||||
|
||||
@Configuration
|
||||
@ConditionalOnProperty(value = "sms.enabled", havingValue = "true")
|
||||
@ConditionalOnClass(com.aliyun.dysmsapi20170525.Client.class)
|
||||
static class AliyunSmsConfig {
|
||||
|
||||
@@ -32,6 +34,7 @@ public class SmsConfig {
|
||||
}
|
||||
|
||||
@Configuration
|
||||
@ConditionalOnProperty(value = "sms.enabled", havingValue = "true")
|
||||
@ConditionalOnClass(com.tencentcloudapi.sms.v20190711.SmsClient.class)
|
||||
static class TencentSmsConfig {
|
||||
|
||||
|
||||
@@ -13,6 +13,8 @@ import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||
@ConfigurationProperties(prefix = "sms")
|
||||
public class SmsProperties {
|
||||
|
||||
private Boolean enabled;
|
||||
|
||||
/**
|
||||
* 配置节点
|
||||
* 阿里云 dysmsapi.aliyuncs.com
|
||||
|
||||
Reference in New Issue
Block a user