whycxzp
2024-08-01 52f98f1a31e682f725f09b4a37bcd316332d3131
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
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;
 
    /**系统运行模式*/
    public static Integer runModel;
 
    @Value("${spring.profiles.active}")
    public void setProfileType(String profileType) {
        YamlProperties.profileType = profileType;
    }
 
    @Value("${configFile.type}")
    public void setRunModel(Integer runModel) {
        YamlProperties.runModel = runModel;
    }
 
 
}