properties配置文件
来源:互联网 发布:服务器同步备份软件 编辑:程序博客网 时间:2024/05/22 14:16
/**
*
* @file PathUtil.java
* @brief 类简要说明:
*
* 类详细说明:配置文件
* @author zhengkunqi
* @version 1.0
* - 下午09:53:15 2017-5-11
*/
public class PathUtil {
private static Properties properties = null;
/**
* 加载类时,先执行静态代码块
*/
static{
try {
//加载配置文件
InputStream is = PathUtil.class.getResourceAsStream("path.properties");
properties = new Properties();
properties.load(is);
} catch (Exception e) {
e.printStackTrace();
}
}
/**
*
* @brief getValue 方法简要说明:
*
* 方法详细说明:根据key值取得对应的value值
* @author zhengkunqi
* @version 1.0
* - 下午09:53:44 2017-5-11
* @par 参数说明
*@param str
*@return
* @par 变更历史:
* - 时间 作者 修改说明
*/
public static String getValue(String str) {
return properties.getProperty(str);
}
*
* @file PathUtil.java
* @brief 类简要说明:
*
* 类详细说明:配置文件
* @author zhengkunqi
* @version 1.0
* - 下午09:53:15 2017-5-11
*/
public class PathUtil {
private static Properties properties = null;
/**
* 加载类时,先执行静态代码块
*/
static{
try {
//加载配置文件
InputStream is = PathUtil.class.getResourceAsStream("path.properties");
properties = new Properties();
properties.load(is);
} catch (Exception e) {
e.printStackTrace();
}
}
/**
*
* @brief getValue 方法简要说明:
*
* 方法详细说明:根据key值取得对应的value值
* @author zhengkunqi
* @version 1.0
* - 下午09:53:44 2017-5-11
* @par 参数说明
*@param str
*@return
* @par 变更历史:
* - 时间 作者 修改说明
*/
public static String getValue(String str) {
return properties.getProperty(str);
}
0 0
- Properties配置文件
- Properties配置文件
- Properties配置文件
- properties配置文件
- Properties配置文件
- properties配置文件
- Properties类读写.properties配置文件
- struts.properties配置文件详解
- struts.properties配置文件
- java 读取properties配置文件
- Java读取properties配置文件
- log4j.properties配置文件
- Log4j配置文件 log4j.properties
- Log4J配置文件log4j.properties
- 读取properties配置文件
- properties配置文件支持中文
- log4j.properties配置文件详解
- Properties 获得配置文件
- Looper.prepare()和Looper.loop()详解
- MacOS之safari无法显示图片
- ORACLE DATABASE 11G RAC 知识图文详细教程之集群概念介绍(一)
- 第六章 异常 try-catch-finally 6.2.3
- jhipster整合mybatis
- properties配置文件
- 委托的示例
- c# 人脸框截图处理
- 3.5 JS设置节点属性
- 做项目中遇到一个小问题 (要让容器与浏览器宽度,高度相等)
- SRWebSocket源码浅析
- 自动登录过BSO的脚本
- js 事件绑定on()的用法,以及对于其他绑定事件的比较
- The Balance (母函数)