This commit is contained in:
cyk
2023-07-07 10:38:42 +08:00
parent c2e2ae2ac4
commit 07620c670c
2 changed files with 3 additions and 3 deletions

View File

@@ -63,7 +63,7 @@ public class UserDao {
connection = JdbcUtils.getConnection();
// sql语句写的操作 ----加上事务
JdbcUtils.beginTransaction(connection); // 开启事务
String insertSql = "INSERT INTO `user` (`userId`, `userName`, `userPassword`,`creatTime`,`isValid`) VALUES (null, ?, ?,?,1);";
String insertSql = "INSERT INTO `user` (`userId`, `userName`, `userPassword`,`creatTime`,`isValid`,projectNum) VALUES (null, ?, ?,?,1,0);";
preparedStatement = connection.prepareStatement(insertSql);
preparedStatement.setString(1, userName);
preparedStatement.setString(2, userPwd);

View File

@@ -37,9 +37,9 @@ public class UploadHandleServlet extends HttpServlet {
//得到上传文件的保存目录将上传的文件存放于WEB-INF目录下不允许外界直接访问保证上传文件的安全
// String savePath = this.getServletContext().getRealPath(File.separator+"WEB-INF"+File.separator+"upload");
String savePath = this.getServletContext().getRealPath(File.separator+"WEB-INF"+File.separator+"upload");
String savePath="E:\\Desktop\\out";
// String savePath="E:\\Desktop\\out";
//上传时生成的临时文件保存目录
String tempPath = this.getServletContext().getRealPath(File.separator+"WEB-INF"+File.separator+"tmp");
File tmpFile = new File(tempPath);