Commit ae5a3f9a authored by Deokhyun Lee's avatar Deokhyun Lee

접속 인증

parent ddecce4e
......@@ -9,6 +9,7 @@ public class MemberDaoImpl implements MemberDao {
private static final String USERNAME = DBCode.USERNAME;// DBMS접속 시 아이디
private static final String PASSWORD = DBCode.PASSWORD;// DBMS접속 시 비밀번호
private static final String URL = DBCode.URL;// DBMS접속할 db명
private boolean isApproved = false;
// 생성자에 연결
public MemberDaoImpl() {
......@@ -146,6 +147,7 @@ public class MemberDaoImpl implements MemberDao {
while (rs.next()) {
if (rs.getString("email").equals(email) && rs.getString("password").equals(password)){
System.out.println("로그인 성공!");
isApproved = true;
}
}
......@@ -185,4 +187,7 @@ public class MemberDaoImpl implements MemberDao {
}
}
public boolean isApproved() {
return isApproved;
}
}
\ No newline at end of file
......@@ -48,6 +48,9 @@ public class MainClass {
changedPassword = sc.nextLine();
memberDao.updateUserInfo(email, password, changedPassword);
}
if (memberDao.isApproved()){
System.out.println("접속 성공!");
}
}
//
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment