Kaynağa Gözat

验证码配置

RuoYi 4 yıl önce
ebeveyn
işleme
3af7af265b

+ 46 - 0
ruoyi-gateway/src/main/java/com/ruoyi/gateway/config/properties/CaptchaProperties.java

@@ -0,0 +1,46 @@
1
+package com.ruoyi.gateway.config.properties;
2
+
3
+import org.springframework.boot.context.properties.ConfigurationProperties;
4
+import org.springframework.cloud.context.config.annotation.RefreshScope;
5
+import org.springframework.context.annotation.Configuration;
6
+
7
+/**
8
+ * 验证码配置
9
+ * 
10
+ * @author ruoyi
11
+ */
12
+@Configuration
13
+@RefreshScope
14
+@ConfigurationProperties(prefix = "security.captcha")
15
+public class CaptchaProperties
16
+{
17
+    /**
18
+     * 验证码开关
19
+     */
20
+    private boolean enabled;
21
+
22
+    /**
23
+     * 验证码类型(math 数组计算 char 字符)
24
+     */
25
+    private String type;
26
+
27
+    public boolean isEnabled()
28
+    {
29
+        return enabled;
30
+    }
31
+
32
+    public void setEnabled(boolean enabled)
33
+    {
34
+        this.enabled = enabled;
35
+    }
36
+
37
+    public String getType()
38
+    {
39
+        return type;
40
+    }
41
+
42
+    public void setType(String type)
43
+    {
44
+        this.type = type;
45
+    }
46
+}