configfileoper.java
来自「同步接收web services请求」· Java 代码 · 共 38 行
JAVA
38 行
/**
*
*/
package com.aceway.vas.sjcraw.cbgp201.common;
import java.io.InputStream;
import java.util.Properties;
/**
* @作者: 武达
* @新疆电信彩铃网关
* @增值业务部
* @版本: 1.0
*/
public class ConfigFileOper {
private static Properties _properties = null;
/**
* @wfunction 读取配置文件
* @wparam key
* @wreturn
*/
public static String getProperty(String key) {
if (_properties == null) {
try {
InputStream ins = ConfigFileOper.class
.getResourceAsStream("/app.properties");
_properties = new Properties();
_properties.load(ins);
} catch (Exception ex) {
ex.printStackTrace();
_properties = null;
}
}
return _properties.getProperty(key);
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?