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
0bdce88d
Commit
0bdce88d
authored
Dec 03, 2021
by
Deokhyun Lee
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Methods already added in the main
parent
ecba8f25
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
3 deletions
+18
-3
MainClass.java
src/member/MainClass.java
+18
-3
No files found.
src/member/MainClass.java
View file @
0bdce88d
...
@@ -9,6 +9,7 @@ import dto.MemberDto;
...
@@ -9,6 +9,7 @@ import dto.MemberDto;
public
class
MainClass
{
public
class
MainClass
{
public
static
void
main
(
String
[]
args
)
{
public
static
void
main
(
String
[]
args
)
{
String
name
,
email
,
major
,
password
,
changedPassword
;
// 멤버 정보 DB 활용
// 멤버 정보 DB 활용
MemberDaoImpl
memberDao
=
new
MemberDaoImpl
();
MemberDaoImpl
memberDao
=
new
MemberDaoImpl
();
// 파일에 있는 데이터를 읽어오기
// 파일에 있는 데이터를 읽어오기
...
@@ -23,15 +24,29 @@ public class MainClass {
...
@@ -23,15 +24,29 @@ public class MainClass {
// 데이터 보기
// 데이터 보기
System
.
out
.
println
(
memberDao
.
selectAll
());
System
.
out
.
println
(
memberDao
.
selectAll
());
// 데이터 수정
// 데이터 수정
System
.
out
.
println
(
"1
로 회원가입; 2 로 로그인
"
);
System
.
out
.
println
(
"1
회원가입; 2 로그인; 3 비번 변경
"
);
Scanner
sc
=
new
Scanner
(
System
.
in
);
Scanner
sc
=
new
Scanner
(
System
.
in
);
int
num
=
sc
.
nextInt
();
int
num
=
sc
.
nextInt
();
sc
.
nextLine
();
sc
.
nextLine
();
if
(
num
==
1
){
if
(
num
==
1
){
System
.
out
.
print
(
"이름, 전공, 이메일, 비번"
);
name
=
sc
.
nextLine
();
major
=
sc
.
nextLine
();
email
=
sc
.
nextLine
();
password
=
sc
.
nextLine
();
memberDao
.
insertSignUpForm
(
name
,
major
,
email
,
password
);
}
else
if
(
num
==
2
){
}
else
if
(
num
==
2
){
System
.
out
.
println
(
"이메일, 비번 입력해주세요"
);
email
=
sc
.
nextLine
();
password
=
sc
.
nextLine
();
memberDao
.
logIn
(
email
,
password
);
}
else
if
(
num
==
3
){
System
.
out
.
println
(
"이메일, 현재 비번, 바꿀 비밀번호 순으로 입력해주세요"
);
email
=
sc
.
nextLine
();
password
=
sc
.
nextLine
();
changedPassword
=
sc
.
nextLine
();
memberDao
.
updateUserInfo
(
email
,
password
,
changedPassword
);
}
}
}
}
...
...
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