xiangpei
2025-06-12 8e25be6ee345ce5d11918943dcc41fa1d4b3a902
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
package cn.lili.common.properties;
 
import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;
 
/**
 * 线程配置
 *
 * @author Chopper
 */
@Data
@Configuration
@ConfigurationProperties(prefix = "lili.verification-code")
public class VerificationCodeProperties {
 
 
    /**
     * 过期时间
     * 包含滑块验证码有效时间, 以及验证通过之后,缓存中存储的验证结果有效时间
     */
    private Long effectiveTime = 600L;
 
    /**
     * 水印
     */
    private String watermark = "";
    /**
     * 干扰数量 最大数量
     */
    private Integer interfereNum = 0;
 
    /**
     * 容错像素
     */
    private Integer faultTolerant = 3;
 
 
    public String getWatermark() {
        return watermark;
    }
 
    public Integer getInterfereNum() {
        if (interfereNum > 2) {
            return 2;
        }
        return interfereNum;
    }
}