首页 > 代码库 > java操作配置文件.properties

java操作配置文件.properties

     一会asp.net,一会java的.....

 

Properties reqProperties = new Properties();
String path = System.getProperty("user.dir");
InputStream in = new FileInputStream(path+File.separator+"message.properties");
reqProperties.load(in);
String attrType = reqProperties.getProperty("attrType");  //获取配置文件中属性名attrType的值
in.close();

java操作配置文件.properties