属性文件(.properties)内容格式
driver=com.mysql.jdbc.Driver url=jdbc:mysql://localhost:3306/mydb user=root password=111 characterEncoding=gb2312
属性文件的加载
Properties props = new Properties();
InputStream in = new BufferedInputStream(new FileInputStream(filePath));
props.load(in);
属性的读取
System .out.println("user:"+props.getProperty("user"));