Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
D
db_studies
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Deokhyun Lee
db_studies
Commits
ae5a3f9a
Commit
ae5a3f9a
authored
Dec 03, 2021
by
Deokhyun Lee
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
접속 인증
parent
ddecce4e
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
0 deletions
+8
-0
MemberDaoImpl.java
src/dao/MemberDaoImpl.java
+5
-0
MainClass.java
src/member/MainClass.java
+3
-0
No files found.
src/dao/MemberDaoImpl.java
View file @
ae5a3f9a
...
...
@@ -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
src/member/MainClass.java
View file @
ae5a3f9a
...
...
@@ -48,6 +48,9 @@ public class MainClass {
changedPassword
=
sc
.
nextLine
();
memberDao
.
updateUserInfo
(
email
,
password
,
changedPassword
);
}
if
(
memberDao
.
isApproved
()){
System
.
out
.
println
(
"접속 성공!"
);
}
}
//
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment