whyclxw
2025-05-15 96510a549bfb313920bf297b28089c4cf57f0146
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
package com.whyc.constant;
 
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;
 
/**
 * Yaml配置参数 实体类
 */
@Component
public class YamlProperties {
 
    /**
     * 运行模式:dev,prod
     */
    public static String profileType;
 
    /**
     * 系统类型
     * 1:普通,没有多重校验
     * 2:严格,有多重校验(登录,防重放,参数过滤)
     */
    public static Integer systemType;
 
    /**人脸识别对比阈值*/
    public static Float faceThreshold;
 
 
 
    /**系统运行模式*/
    public static Integer runModel;
 
    /**FTP信息*/
    public static String appId4Win;
    public static String sdkKey4Win;
    public static String appId4Linux;
    public static String sdkKey4Linux;
    public static String activeKey;
    public static Integer faceType;
 
    /*====== 自定义信息 ======*/
 
    /**跨域白名单*/
    public static String allowedCORSDomainList;
 
    public static String publicKey;
    public static String privateKey;
 
    @Value("${custom.rsa.publicKey}")
    public void setPublicKey(String publicKey) {
        YamlProperties.publicKey = publicKey;
    }
 
    @Value("${custom.rsa.privateKey}")
    public void setPrivateKey(String privateKey) {
        YamlProperties.privateKey = privateKey;
    }
 
    @Value("${custom.cors}")
    public void setAllowedCORSDomainList(String allowedCORSDomainList) {
        YamlProperties.allowedCORSDomainList = allowedCORSDomainList;
    }
    @Value("${spring.profiles.active}")
    public void setProfileType(String profileType) {
        YamlProperties.profileType = profileType;
    }
 
    @Value("${system.type}")
    public void setSystemType(Integer systemType) {
        YamlProperties.systemType = systemType;
    }
 
 
 
    @Value("${configFile.type}")
    public void setRunModel(Integer runModel) {
        YamlProperties.runModel = runModel;
    }
 
    @Value("${custom.face.activeKey}")
    private void setActiveKey(String activeKey) {
        YamlProperties.activeKey = activeKey;
    }
 
    @Value("${custom.face.type}")
    public void setFaceType(Integer faceType) {
        YamlProperties.faceType = faceType;
    }
 
    @Value("${custom.face.appId4Win}")
    private void setAppId4Win(String appId4Win) {
        YamlProperties.appId4Win = appId4Win;
    }
 
    @Value("${custom.face.sdkKey4Win}")
    private void setSdkKey4Win(String sdkKey4Win) {
        YamlProperties.sdkKey4Win = sdkKey4Win;
    }
 
    @Value("${custom.face.appId4Linux}")
    private void setAppId4Linux(String appId4Linux) {
        YamlProperties.appId4Linux = appId4Linux;
    }
 
    @Value("${custom.face.sdkKey4Linux}")
    private void setSdkKey4Linux(String sdkKey4Linux) {
        YamlProperties.sdkKey4Linux = sdkKey4Linux;
    }
 
    @Value("${custom.face.threshold}")
    private void setFaceThreshold(Float faceThreshold) {
        YamlProperties.faceThreshold = faceThreshold;
    }
}