public static String getProperticesValue(String key,String configName) throws IOException{ String path="/"; // String path=getPath(); // if(path!=null){ path+=configName+".properties"; // InputStream in = new BufferedInputStream(new FileInputStream(path)); InputStream in = getInputStream(new GetResource(), path); Properties properties=new Properties(); properties.load(in); String value=properties.get(key)+""; // log.debug("---方法getProperticesValue通过绝对路径和key获取web项目"+configName+".propertices的value值:"+value); return value; // }else{ // return null; // } }