(上传至新浪云服务器)
1.修改DBHelper的连接方式
static{
try {
Class.forName("com.mysql.jdbc.Driver");
} catch (ClassNotFoundException e) {
e.printStackTrace();
}
}
/**
* 获取连接
*
* @return
*/
private Connection getConnection() {
Connection con = null;
try {
String username = System.getenv("ACCESSKEY");
String password = System.getenv("SECRETKEY");
con=DriverManager.getConnection("jdbc:mysql://w.rdc.sae.sina.com.cn:3306/app_qiji",username,password);
} catch (SQLException e) {
e.printStackTrace();
}
return con;
}
2.修改FileUpload的服务器文件夹路径,将路径改到本地
1.修改DBHelper的连接方式
static{
try {
Class.forName("com.mysql.jdbc.Driver");
} catch (ClassNotFoundException e) {
e.printStackTrace();
}
}
/**
* 获取连接
*
* @return
*/
private Connection getConnection() {
Connection con = null;
try {
String username = System.getenv("ACCESSKEY");
String password = System.getenv("SECRETKEY");
con=DriverManager.getConnection("jdbc:mysql://w.rdc.sae.sina.com.cn:3306/app_qiji",username,password);
} catch (SQLException e) {
e.printStackTrace();
}
return con;
}
2.修改FileUpload的服务器文件夹路径,将路径改到本地