-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #80 from cosmos-1885/feature/1-branch-account
Feature/1 branch account
- Loading branch information
Showing
87 changed files
with
1,865 additions
and
1,172 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
33 changes: 33 additions & 0 deletions
33
src/main/java/com/example/demo/config/errors/ErrorCode.java
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,33 @@ | ||
package com.example.demo.config.errors; | ||
|
||
import lombok.AllArgsConstructor; | ||
import lombok.Getter; | ||
|
||
import static org.springframework.http.HttpStatus.*; | ||
|
||
@Getter | ||
public enum ErrorCode { | ||
/** | ||
* status: 400 | ||
*/ | ||
DUPLICATE_EMAIL("동일한 이메일이 존재합니다."), | ||
NOT_MATCH_EMAIL("이메일이 일치하지 않습니다."), | ||
NOT_MATCH_PASSWORD("비밀번호가 일치하지 않습니다."), | ||
INVALID_JWT_SIGNATUE("유효하지 않은 JWT 토큰 서명입니다."), | ||
INVALID_JWT_TOKEN("손상된 JWT 토큰입니다."), | ||
EXPIRED_JWT_TOKEN("만료된 JWT 토큰입니다."), | ||
UNSUPPORTED_JWT_TOKEN("지원하지 않는 JWT 토큰입니다."), | ||
ILLEGAL_ARGUMENT_EXCEPTION("JWT 토큰 내의 정보가 없습니다"), | ||
|
||
/** | ||
* status: 404 | ||
*/ | ||
NOT_EXIST_INTEREST("관심사가 존재하지 않습니다."), | ||
NOT_EXIST_USER("사용자가 존재하지 않습니다."); | ||
|
||
private final String message; | ||
|
||
ErrorCode(String message) { | ||
this.message = message; | ||
} | ||
} |
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
13 changes: 13 additions & 0 deletions
13
src/main/java/com/example/demo/config/errors/exception/DuplicateEmailException.java
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,13 @@ | ||
package com.example.demo.config.errors.exception; | ||
|
||
import com.example.demo.config.errors.ErrorCode; | ||
import lombok.Getter; | ||
|
||
@Getter | ||
public class DuplicateEmailException extends RuntimeException { | ||
public final ErrorCode errorCode; | ||
|
||
public DuplicateEmailException(ErrorCode errorCode) { | ||
this.errorCode = errorCode; | ||
} | ||
} |
13 changes: 13 additions & 0 deletions
13
src/main/java/com/example/demo/config/errors/exception/EmailNotMatchException.java
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,13 @@ | ||
package com.example.demo.config.errors.exception; | ||
|
||
import com.example.demo.config.errors.ErrorCode; | ||
import lombok.Getter; | ||
|
||
@Getter | ||
public class EmailNotMatchException extends RuntimeException { | ||
public final ErrorCode errorCode; | ||
|
||
public EmailNotMatchException(ErrorCode errorCode) { | ||
this.errorCode = errorCode; | ||
} | ||
} |
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
13 changes: 13 additions & 0 deletions
13
src/main/java/com/example/demo/config/errors/exception/InterestNotExistException.java
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,13 @@ | ||
package com.example.demo.config.errors.exception; | ||
|
||
import com.example.demo.config.errors.ErrorCode; | ||
import lombok.Getter; | ||
|
||
@Getter | ||
public class InterestNotExistException extends RuntimeException { | ||
public final ErrorCode errorCode; | ||
|
||
public InterestNotExistException(ErrorCode errorCode) { | ||
this.errorCode = errorCode; | ||
} | ||
} |
13 changes: 13 additions & 0 deletions
13
src/main/java/com/example/demo/config/errors/exception/JWTTokenException.java
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,13 @@ | ||
package com.example.demo.config.errors.exception; | ||
|
||
import com.example.demo.config.errors.ErrorCode; | ||
import lombok.Getter; | ||
|
||
@Getter | ||
public class JWTTokenException extends RuntimeException { | ||
public final ErrorCode errorCode; | ||
|
||
public JWTTokenException(ErrorCode errorCode) { | ||
this.errorCode = errorCode; | ||
} | ||
} |
13 changes: 13 additions & 0 deletions
13
src/main/java/com/example/demo/config/errors/exception/PasswordNotMatchException.java
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,13 @@ | ||
package com.example.demo.config.errors.exception; | ||
|
||
import com.example.demo.config.errors.ErrorCode; | ||
import lombok.Getter; | ||
|
||
@Getter | ||
public class PasswordNotMatchException extends RuntimeException { | ||
public final ErrorCode errorCode; | ||
|
||
public PasswordNotMatchException(ErrorCode errorCode) { | ||
this.errorCode = errorCode; | ||
} | ||
} |
13 changes: 13 additions & 0 deletions
13
src/main/java/com/example/demo/config/errors/exception/UserNotExistException.java
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,13 @@ | ||
package com.example.demo.config.errors.exception; | ||
|
||
import com.example.demo.config.errors.ErrorCode; | ||
import lombok.Getter; | ||
|
||
@Getter | ||
public class UserNotExistException extends RuntimeException { | ||
public final ErrorCode errorCode; | ||
|
||
public UserNotExistException(ErrorCode errorCode) { | ||
this.errorCode = errorCode; | ||
} | ||
} |
14 changes: 14 additions & 0 deletions
14
src/main/java/com/example/demo/config/errors/exception/ValidationException.java
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,14 @@ | ||
package com.example.demo.config.errors.exception; | ||
|
||
import lombok.Getter; | ||
|
||
import java.util.Map; | ||
|
||
@Getter | ||
public class ValidationException extends RuntimeException{ | ||
public final Map<String, String> errorList; | ||
|
||
public ValidationException(Map<String, String> errorList) { | ||
this.errorList = errorList; | ||
} | ||
} |
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
6 changes: 2 additions & 4 deletions
6
...e/demo/config/auth/CustomUserDetails.java → ...mo/config/security/CustomUserDetails.java
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
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
Oops, something went wrong.