whyclxw
2024-05-23 339e1009908a0549ae3f5869a7a109cfe9540807
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
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
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 String messageSwitch;
    public static String messageSecretId;
    public static String messageSecretKey;
    public static String messageRegion;
    public static String messageSdkAppId;
    public static String messageSignName;
    public static String messageTemplateId;
    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 alarmTaskSwitch;
 
    /**系统运行模式*/
    public static Integer runModel;
 
    /**自定义常量*/
    public static String fontDynamicCodeSwitch;
    public static String allowedCORSDomainList;
    public static String restartPasswd;
    public static String publicKeyOld;
    public static String privateKeyOld;
    public static String publicKey;
    public static String privateKey;
    public static String aesDefaultKey;
    public static String aesIv;
    public static String i18nLanguage;
 
    @Value("${spring.profiles.active}")
    public void setProfileType(String profileType) {
        YamlProperties.profileType = profileType;
    }
 
    @Value("${system.type}")
    public void setSystemType(Integer systemType) {
        YamlProperties.systemType = systemType;
    }
 
    /* @Value("${custom.face.threshold}")
    private void setFaceThreshold(Float faceThreshold) {
        YamlProperties.faceThreshold = faceThreshold;
    }
 
   @Value("${custom.message.switch}")
    private void setMessageSwitch(String messageSwitch) {
        YamlProperties.messageSwitch = messageSwitch;
    }
 
    @Value("${custom.message.secret_id}")
    private void setMessageSecretId(String messageSecretId) {
        YamlProperties.messageSecretId = messageSecretId;
    }
 
    @Value("${custom.message.secret_key}")
    private void setMessageSecretKey(String messageSecretKey) {
        YamlProperties.messageSecretKey = messageSecretKey;
    }
 
    @Value("${custom.message.region}")
    private void setMessageRegion(String messageRegion) {
        YamlProperties.messageRegion = messageRegion;
    }
 
    @Value("${custom.message.smsSdkAppId}")
    private void setMessageSdkAppId(String messageSdkAppId) {
        YamlProperties.messageSdkAppId = messageSdkAppId;
    }
 
    @Value("${custom.message.signName}")
    private void setMessageSignName(String messageSignName) {
        YamlProperties.messageSignName = messageSignName;
    }
 
    @Value("${custom.message.templateId}")
    private void setMessageTemplateId(String messageTemplateId) {
        YamlProperties.messageTemplateId = messageTemplateId;
    }
 
    @Value("${custom.alarm.task.switch}")
    private void setAlarmTaskSwitch(String alarmTaskSwitch) {
        YamlProperties.alarmTaskSwitch = alarmTaskSwitch;
    }
 
    @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.activeKey}")
    private void setActiveKey(String activeKey) {
        YamlProperties.activeKey = activeKey;
    }
 
    @Value("${custom.face.type}")
    public void setFaceType(Integer faceType) {
        YamlProperties.faceType = faceType;
    }
*/
    @Value("${custom.fontDynamicCode}")
    public void setFontDynamicCodeSwitch(String fontDynamicCodeSwitch) {
        YamlProperties.fontDynamicCodeSwitch = fontDynamicCodeSwitch;
    }
 
    @Value("${configFile.type}")
    public void setRunModel(Integer runModel) {
        YamlProperties.runModel = runModel;
    }
 
    @Value("${custom.cors}")
    public void setAllowedCORSDomainList(String allowedCORSDomainList) {
        YamlProperties.allowedCORSDomainList = allowedCORSDomainList;
    }
 
    @Value("${custom.restartPasswd}")
    public void setRestartPasswd(String restartPasswd) {
        YamlProperties.restartPasswd = restartPasswd;
    }
 
    @Value("${custom.rsa.publicKeyOld}")
    public void setPublicKeyOld(String publicKeyOld) {
        YamlProperties.publicKeyOld = publicKeyOld;
    }
 
    @Value("${custom.rsa.privateKeyOld}")
    public void setPrivateKeyOld(String privateKeyOld) {
        YamlProperties.privateKeyOld = privateKeyOld;
    }
 
    @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.aes.defaultKey}")
    public void setAesDefaultKey(String aesDefaultKey) {
        YamlProperties.aesDefaultKey = aesDefaultKey;
    }
 
    @Value("${custom.aes.iv}")
    public void setAesIv(String aesIv) {
        YamlProperties.aesIv = aesIv;
    }
 
    @Value("${custom.i18n}")
    public void setI18nLanguage(String i18nLanguage) {
        YamlProperties.i18nLanguage = i18nLanguage;
    }
}