preferCategory;
+ @NotBlank
+ @Email
+ String email;
+ @NotBlank
+ String password;
+ @NotNull
+ Role role;
+ }
+
+ @Getter
+ @Setter
+ public static class LoginRequestDTO {
+ @NotBlank(message = "이메일은 필수입니다.")
+ @Email(message = "올바른 이메일 형식이어야 합니다.")
+ private String email;
+
+ @NotBlank(message = "패스워드는 필수입니다.")
+ private String password;
}
}
\ No newline at end of file
diff --git a/src/main/java/umc/spring/web/dto/MemberResponseDTO.java b/src/main/java/umc/spring/web/dto/MemberResponseDTO.java
index 3d5b867..b56184d 100644
--- a/src/main/java/umc/spring/web/dto/MemberResponseDTO.java
+++ b/src/main/java/umc/spring/web/dto/MemberResponseDTO.java
@@ -17,4 +17,23 @@ public static class MemberJoinResultDTO {
Long memberId;
LocalDateTime createdAt;
}
+
+ @Builder
+ @Getter
+ @NoArgsConstructor
+ @AllArgsConstructor
+ public static class LoginResultDTO {
+ Long memberId;
+ String accessToken;
+ }
+
+ @Builder
+ @Getter
+ @NoArgsConstructor
+ @AllArgsConstructor
+ public static class MemberInfoDTO {
+ String name;
+ String email;
+ String gender;
+ }
}
diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml
index 5fb539e..72f08a9 100644
--- a/src/main/resources/application.yml
+++ b/src/main/resources/application.yml
@@ -25,4 +25,10 @@ spring:
use_sql_comments: true
hbm2ddl:
auto: update
- default_batch_fetch_size: 1000
\ No newline at end of file
+ default_batch_fetch_size: 1000
+
+jwt:
+ token:
+ secretKey: umceightfightingjwttokenauthentication
+ expiration:
+ access: 14400000
\ No newline at end of file
diff --git a/src/main/resources/templates/admin.html b/src/main/resources/templates/admin.html
new file mode 100644
index 0000000..55dbff1
--- /dev/null
+++ b/src/main/resources/templates/admin.html
@@ -0,0 +1,10 @@
+
+
+
+ Admin Page
+
+
+Admin Page
+관리자만 접근할 수 있는 페이지입니다.
+
+
\ No newline at end of file
diff --git a/src/main/resources/templates/home.html b/src/main/resources/templates/home.html
new file mode 100644
index 0000000..8c10cb1
--- /dev/null
+++ b/src/main/resources/templates/home.html
@@ -0,0 +1,20 @@
+
+
+
+ Home
+
+
+Welcome to Home Page!
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/main/resources/templates/login.html b/src/main/resources/templates/login.html
new file mode 100644
index 0000000..7804a3a
--- /dev/null
+++ b/src/main/resources/templates/login.html
@@ -0,0 +1,26 @@
+
+
+
+ Login
+
+
+Login
+
+
+사용자 이름 또는 비밀번호가 잘못되었습니다.
+로그아웃되었습니다.
+
+
+계정이 없나요? Sign up
+
+
\ No newline at end of file
diff --git a/src/main/resources/templates/signup.html b/src/main/resources/templates/signup.html
new file mode 100644
index 0000000..18d82ec
--- /dev/null
+++ b/src/main/resources/templates/signup.html
@@ -0,0 +1,72 @@
+
+
+
+ 회원가입
+
+
+
+회원가입
+
+
+
\ No newline at end of file