读取src路径下的druid.properties文件 方式一:使用 FileInputStream 读取文件 //使用 FileInputStream 读取文件 //该方式可以读取任意路径下的配置文件。 @Test public void func1(){ try { InputStream is = new FileInputStream("src/druid.properties"); Properties prop = new Properties(); prop.load(is); String value = prop.