-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Resolves #7] 예외 처리 구현 #9
base: develop
Are you sure you want to change the base?
[Resolves #7] 예외 처리 구현 #9
Conversation
- Problem - Level : Problem만 단방향으로 연관 가짐 - Problem - ProblemCategory - Category : Problem만 ProblemCategory와 양방향 연관 가짐 (카테고리별 문제 조회 필요할 경우에 Category에 연관 설정할 것) - Problem 연관 객체 Eager로 가져오도록 설정 (논의 필요)
…t/2/basic-entity [Resolves KHUCapston-concoder#2] 기본 도메인 모델 작성
…-concoder#5) * chore : add config for redis * chore: add config for redis * test: add test for redis * feat: 엔티티 작성 - Problem - Level : Problem만 단방향으로 연관 가짐 - Problem - ProblemCategory - Category : Problem만 ProblemCategory와 양방향 연관 가짐 (카테고리별 문제 조회 필요할 경우에 Category에 연관 설정할 것) - Problem 연관 객체 Eager로 가져오도록 설정 (논의 필요) * feat: Repository 작성 * refactor: 필요 없는 gitkeep 삭제 * feat: 엔티티 작성 KHUCapston-concoder#1 * refactor : 필요없는 주석 삭제 KHUCapston-concoder#6 * refactor : 콘솔 확인 삭제 KHUCapston-concoder#6 Co-authored-by: Subin Min <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
수고했습니당~! 리뷰 확인해주세용~
private final String message; | ||
private final HttpStatus status; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
중복 필드 삭제해야할것 같습니당~
protected ResponseEntity<ErrorResponse> handleNotBlankValid(MethodArgumentNotValidException e){ | ||
log.error("NotValid!", e); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
메서드 이름만 바꿔주세용~
@Builder | ||
public ErrorResponse(ErrorCode errorCode){ | ||
this.status = errorCode.getStatus().value(); | ||
this.error= errorCode.getStatus().name(); | ||
this.code = errorCode.name(); | ||
this.message = errorCode.getMessage(); | ||
} | ||
|
||
@Builder | ||
public ErrorResponse(int status, String error, String code, String message) { | ||
this.status = status; | ||
this.error = error; | ||
this.code = code; | ||
this.message = message; | ||
} | ||
|
||
public ErrorResponse(String defaultMessage) { | ||
this.message = defaultMessage; | ||
} | ||
|
||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
빌더랑 생성자 둘 중 하나 패턴으로만 통일하는게 이후 코드가 깔끔해질듯!
75eb8a7
to
d22a71b
Compare
#7
작업 목록
예외 처리 구현
논의 사항