package com.lxw.test3d.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;
|
}
|
|
|
|
}
|