//String path = System.getProperty("user.dir") + "\src\dbpool.properties"; // 路径 /** * 加载配置文件 */ // FileInputStream is = new FileInputStream(path); Properties props = new Properties(); props.load(getClass().getResourceAsStream("/dbpool.properties"));
System.getProperty("user.dir")读出来的是%tomcat%/bin