/**
* 修改配置文件信息
*/
public static void updataPro() {
Properties pro = new Properties();
try {
FileInputStream fis = new FileInputStream("src/db.properties");
pro.load(fis);
pro.setProperty("driverClass", "com.microsoft.jdbc.sqlserver.SQLServerDriver");
pro.setProperty("url", "jdbc:microsoft:sqlserver://192.168.0.199:1433;DatabaseName=ylkdb");
pro.setProperty("username", "ylk");
pro.setProperty("password", "`12345");
OutputStream os = null;
os = new FileOutputStream("src/db.properties");
pro.store(os, null);
os.flush();
os.close();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}