此工具类,用于初始化配置文件的配置
@Component
public class ConstantPropertiesUtils implements InitializingBean {
/**
* 极光appkey
*/
@Value("${jiguang.app_key}")
private String jgappkey;
/**
* 极光mastertsecret
*/
@Value("${jiguang.mastert_secret}")
private String jgmastertsecret;
/**
* 快递100 customer
*/
@Value("${kuaidi100.customer}")
private String kdcustomer;
/**
* 快递100 key
*/
@Value("${kuaidi100.key}")
private String kdkey;
public static String JgAppKey;
public static String JgMastertSecret;
public static String KdCustomer;
public static String KdKey;
@Override
public void afterPropertiesSet() throws Exception {
JgAppKey = jgappkey;
JgMastertSecret = JgMastertSecret;
KdCustomer=kdcustomer;
KdKey=kdkey;
}
}