Properties文件读取
public class Test {
public static void main(String[] args) throws IOException {
InputStream in = Test.class.getClassLoader().getResourceAsStream("DB.properties");
Properties prop = new Properties();
prop.load(in);
System.out.println(prop.get("driverClass"));
}
}
感谢您的阅读,您的支持是我写博客动力。