java读取配置文件写法
来源:互联网 发布:排名软件 编辑:程序博客网 时间:2024/05/08 17:20
package com.lile.util;
import java.io.InputStream;
import java.util.Properties;
public class PropertiesUtil {
public static String getValue(String key){
Properties properties = new Properties();
InputStream is = new PropertiesUtil().getClass().getResourceAsStream("/diary.properties");
try{
properties.load(is);
}catch(Exception e){
}
return (String)properties.get(key);
}
}
import java.io.InputStream;
import java.util.Properties;
public class PropertiesUtil {
public static String getValue(String key){
Properties properties = new Properties();
InputStream is = new PropertiesUtil().getClass().getResourceAsStream("/diary.properties");
try{
properties.load(is);
}catch(Exception e){
}
return (String)properties.get(key);
}
}
0 0
- java读取配置文件写法
- android读取配置文件写法
- Java中读取图片和配置文件的写法
- C语言读取配置文件的另类写法
- java读取配置文件
- java读取配置文件
- java 读取properties配置文件
- Java读取properties配置文件
- JAVA读取配置文件路径
- java读取xml配置文件
- JAVA读取配置文件
- Java读取配置文件
- Java配置文件读取
- java读取xml配置文件
- java读取properties配置文件
- java 读取配置文件properties
- java读取配置文件
- Java读取配置文件
- 回溯算法(一):八皇后问题
- 简单的一种MD5加密
- Struts中ActionContext和ServletActionContext的比较
- link和import的区别
- 静态资源无法找到(No mapping found for HTTP request with URI)问题
- java读取配置文件写法
- Java内存模型
- 图像滤波
- 关于R.string.xxx
- Codeforces Round #374 (Div. 2) A~D
- springmvc拦截器的使用
- uva211 回溯
- C#中的反射原理
- 去除performSelector的leak警告