This repository has been archived by the owner on Aug 14, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8b6bfd8
commit 1aadf01
Showing
12 changed files
with
52 additions
and
187 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -35,3 +35,5 @@ out/ | |
|
||
### VS Code ### | ||
.vscode/ | ||
|
||
src/main/resources/parkyounghwan/application-password.properties |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
74 changes: 6 additions & 68 deletions
74
src/main/kotlin/com/flabedu/blackpostoffice/parkyounghwan/domain/User.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,70 +1,8 @@ | ||
package com.flabedu.blackpostoffice.parkyounghwan.domain | ||
|
||
import java.lang.IllegalArgumentException | ||
|
||
data class User (val id: Long, val name: String, val email: String, val password: String) | ||
|
||
/* | ||
class User() { | ||
var id: Int = 0 | ||
var name: String = "" | ||
set(value) { | ||
if (value.length < 2 || value.length > 13) { | ||
throw IllegalArgumentException("INVALID NAME VALUE") | ||
} else { | ||
try { | ||
field = value | ||
} catch (e: Exception) { | ||
// TODO: 회원 이름 등록 시 예상하지 못한 예외 처리 | ||
throw Exception() | ||
} finally { | ||
field = "" | ||
} | ||
} | ||
} | ||
var email: String = "" | ||
set(value) { | ||
val regex = Regex("[0-9a-zA-Z]([-_.]?[0-9a-zA-Z])*@[0-9a-zA-Z]([-_.]?[0-9a-zA-Z])*\\.[a-zA-Z]{2,3}") | ||
if (!value.matches(regex)) { | ||
throw IllegalArgumentException("INVALID EMAIL VALUE") | ||
} else { | ||
try { | ||
field = value | ||
} catch (e: Exception) { | ||
// TODO: 회원 이메일 등록 시 예상하지 못한 예외 처리 | ||
throw Exception() | ||
} finally { | ||
field = "" | ||
} | ||
} | ||
} | ||
// 숫자, 문자, 특수문자 모두 포함 (8~15자) | ||
var password: String = "" | ||
set(value) { | ||
val regex = Regex("^(?=.*[A-Za-z])(?=.*[0-9])(?=.*[\$@\$!%*#?&]).{8,15}.\$") | ||
if (!value.matches(regex)) { | ||
throw IllegalArgumentException("INVALID PASSWORD VALUE") | ||
} else { | ||
try { | ||
field = value | ||
} catch (e: Exception) { | ||
throw Exception() | ||
} finally { | ||
field = "" | ||
} | ||
} | ||
} | ||
constructor(id: Int, name: String, email: String, password: String) : this() { | ||
this.id = id | ||
this.name = name | ||
this.email = email | ||
this.password = password | ||
} | ||
} | ||
*/ | ||
data class User ( | ||
var id: Long = 0, | ||
var name: String = "", | ||
var email: String = "", | ||
var password: String = "", | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,4 @@ | ||
# default profiles | ||
spring: | ||
datasource: | ||
hikari: | ||
driver-class-name: org.h2.Driver | ||
jdbc-url: jdbc:h2:mem:test | ||
username: sa | ||
password: | ||
|
||
h2: | ||
console: | ||
enabled: true | ||
profiles: | ||
active: local |
3 changes: 3 additions & 0 deletions
3
src/main/resources/parkyounghwan/application-parkyounghwan.properties
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver | ||
spring.datasource.url=jdbc:mysql://localhost:3306/black-postoffice?serverTimeZone=UTC$CharacterEncoding=UTF-8 | ||
spring.datasource.username=root |
14 changes: 0 additions & 14 deletions
14
src/main/resources/parkyounghwan/application-parkyounghwan.yml
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
43 changes: 0 additions & 43 deletions
43
src/test/kotlin/com/flabedu/blackpostoffice/domain/UserValidationCheckTest.kt
This file was deleted.
Oops, something went wrong.
34 changes: 0 additions & 34 deletions
34
src/test/kotlin/com/flabedu/blackpostoffice/parkyounghwan/dao/UserDaoTest.kt
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters