lxw
2023-05-11 95923289bad7b9aac70cb4a4708db6e5f2d96b2c
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
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 Integer runModel;
 
 
 
    @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;
    }
 
 
 
}