-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* feat: 패키지 재정리, 테스트 제거 * feat: 엔티티 설계에 따른 도메인 구현 * feat: 공통 에러타입,에러,응답 구현 * feat: 컨트롤러 로깅 AOP 구현(#27) * feat: 문서화 위한 Swagger 설정 구현(#39) * feat: 컴파일 에러 부분 null 로 변경, TODO 마킹 * style: 메소드 간 개행 분리
- Loading branch information
1 parent
84a6ec8
commit 8cf1e7c
Showing
36 changed files
with
393 additions
and
493 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package corea.exception; | ||
|
||
public class CoreaException extends Exception { | ||
private final ExceptionType exceptionType; | ||
|
||
public CoreaException(ExceptionType exceptionType) { | ||
this.exceptionType = exceptionType; | ||
} | ||
|
||
public CoreaException(ExceptionType exceptionType, Throwable cause) { | ||
super(cause); | ||
this.exceptionType = exceptionType; | ||
} | ||
|
||
public ExceptionType getExceptionType() { | ||
return exceptionType; | ||
} | ||
} |
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,4 @@ | ||
package corea.exception; | ||
|
||
public record ErrorResponse(String 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
package corea.exception; | ||
|
||
import org.springframework.http.HttpStatus; | ||
|
||
public enum ExceptionType { | ||
SERVER_ERROR(HttpStatus.INTERNAL_SERVER_ERROR,"서버에 문제가 발생했습니다."); | ||
private final HttpStatus httpStatus; | ||
private final String message; | ||
|
||
ExceptionType(final HttpStatus httpStatus, final String message) { | ||
this.httpStatus = httpStatus; | ||
this.message = message; | ||
} | ||
public HttpStatus getHttpStatus() { | ||
return httpStatus; | ||
} | ||
public String getMessage() { | ||
return message; | ||
} | ||
} |
Oops, something went wrong.