public static final String CONFIG_FILE_PATH ="/com/anyi/gwk/ftp/gwk_ba_config.prop";
//构造方法
public FTPConfiger() {}
/**
* 获取ftp配置文件全部信息
*
* @return
* @throws BusinessException
*/
public static Properties getProperties() throws BusinessException {
//如果已经初始化,直接返回
if (properties != null) {
return properties;
}
Properties props = new Properties();
try {
props.load(FTPConfiger.class.getResourceAsStream(CONFIG_FILE_PATH));
//zai zheli de fang fa huo qu dang qian lei de wei zhi
} catch (IOException e) {
logger.error("银行接口配置文件读取时发生错误!原因:" + e.getMessage());
e.printStackTrace();
throw new BusinessException("银行接口配置文件读取时发生错误!原因:" + e.getMessage());
}
properties=props;
return props;
}