try {
Properties property = new Properties();
InputStream inputStream = this.getClass().getClassLoader().getResourceAsStream("config.properties");
property.load(inputStream);
String str=property.getProperty("jdbc_url");
String str1=property.getProperty("jdbc_username");
String str2=property.getProperty("jdbc_password");
} catch (IOException e) {
System.out.println("load config.properties exception: " + e.getMessage());
}
懂得都懂