/** * 初始化方法 */ private void doInit() { try { File path = new File("./conf/"); if (!path.exists()) { System.out.println("ConfilgManager Init Error: There is no folder named 'conf' under src file."); return; } File[] confFiles = path.listFiles(new DirFilter(".*//.properties"));//// for (int i = 0; i < confFiles.length; i++) { File f = confFiles[i]; if (f.exists() && f.isFile()) { Properties properties = new Properties(); InputStream is = new FileInputStream(f); properties.load(is); name2properties.put(f.getName(), properties); } }