package com.whyc.constant;
|
|
import org.springframework.beans.factory.annotation.Value;
|
import org.springframework.stereotype.Component;
|
|
import java.util.List;
|
|
/**
|
* 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 alarmTaskSwitch;
|
|
/**系统运行模式*/
|
public static Integer runModel;
|
|
/**FTP信息*/
|
/*public static String ftpIp;
|
public static Integer ftpPort;
|
public static String ftpUserName;
|
public static String ftpPassword;*/
|
|
/*====== 自定义信息 ======*/
|
|
/**跨域白名单*/
|
public static String allowedCORSDomainList;
|
|
public static String publicKey;
|
public static String privateKey;
|
|
public static List<String> videoStreamIds;
|
|
@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("${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("${configFile.type}")
|
public void setRunModel(Integer runModel) {
|
YamlProperties.runModel = runModel;
|
}
|
|
/*@Value("${ftpInforMation.ftpIp}")
|
public void setFtpIp(String ftpIp){
|
YamlProperties.ftpIp=ftpIp;
|
}
|
|
@Value("${ftpInforMation.ftpPort}")
|
public void setFtpPort(Integer ftpPort){
|
YamlProperties.ftpPort=ftpPort;
|
}
|
|
@Value("${ftpInforMation.ftpUserName}")
|
public void setFtpUserName(String ftpUserName){
|
YamlProperties.ftpUserName=ftpUserName;
|
}
|
|
@Value("${ftpInforMation.ftpPassword}")
|
public void setFtpPassword(String ftpPassword){
|
YamlProperties.ftpPassword=ftpPassword;
|
}*/
|
@Value("${video.streamIds}")
|
public void setVideoStreamIds(List<String> videoStreamIds) {
|
YamlProperties.videoStreamIds = videoStreamIds;
|
}
|
}
|