package com.xhkjedu.slive.config;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

/**
 * @author ywx
 * @classname ConfigKey
 * @description 读取配置文件类
 * @date 2020/10/16 9:19
 **/
@Component
public class ConfigKey {
    public static String address;

    @Value("${ws.address}")
    public void setAddress(String address) {
        ConfigKey.address = address;
    }

    public static String cloudapi;//云平台接口
    @Value("${cloudapi}")
    public void setCloudapi(String cloudapi) {
        this.cloudapi = cloudapi;
    }

    public static String appId;
    public static String appCertificate;
    public static Integer expirationTimeInSeconds;

    @Value("${agora.appId}")
    public void setAppId(String appId) {
        ConfigKey.appId = appId;
    }

    @Value("${agora.appCertificate}")
    public void setAppCertificate(String appCertificate) {
        ConfigKey.appCertificate = appCertificate;
    }

    @Value("${agora.expirationTimeInSeconds}")
    public void setExpirationTimeInSeconds(Integer expirationTimeInSeconds) {
        ConfigKey.expirationTimeInSeconds = expirationTimeInSeconds;
    }

    public static String ipregiondb;//解析ip地址归属地

    @Value("${ipregiondb}")
    public void setIpregiondb(String ipregiondb){
        ConfigKey.ipregiondb = ipregiondb;
    }

    public static Integer buildnum;//构建号

    @Value("${buildnum}")
    public void setBuildnum(Integer buildnum){
        this.buildnum = buildnum;
    }
}
