-
Notifications
You must be signed in to change notification settings - Fork 2
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
feat: 공통 예외 및 성공 Response 구현 #10
Conversation
@@ -4,6 +4,7 @@ build/ | |||
!gradle/wrapper/gradle-wrapper.jar | |||
!**/src/main/**/build/ | |||
!**/src/test/**/build/ | |||
**/application-secret.properties |
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.
이 파일은 어디에 쓰이는 건가요??
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.
yml 파일에 ${변수} 로 들어가는 변수를 application-secret.properties 파일 내에 적어두면 세팅이 가능합니다! 세팅 방법에는 여러개 있는데 저는 저 방법을 사용하는 걸 선호합니다
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.
오와 하나 배워 갑니다 .. ovo
import com.depromeet.global.dto.type.SuccessType; | ||
|
||
public enum MemberSuccessType implements SuccessType { | ||
GET_SUCCESS("MEMBER_1", "멤버 조회에 성공하였습니다"); |
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.
앞에 GET은 request type이 아니라 조회라는 뜻이 맞을까요!
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.
음 사실 저 네이밍은 별도로 합의해서 변경해도 돼요~ 내일 얘기해봅시다!
} | ||
|
||
/** | ||
* 500 INTERNEL_SERVER |
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.
INTERNAL..................aldksgo
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.
헉스 ㅋㅋㅋㅋ 오타났다..
@@ -0,0 +1,12 @@ | |||
## 🌱 관련 이슈 |
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.
역시 갓민철님....
/** | ||
* CUSTOM | ||
*/ | ||
@ExceptionHandler(BaseException.class) |
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.
customexception을 가장 마지막에 둔 이유가 있을까요?
@@ -2,6 +2,7 @@ spring: | |||
config: | |||
activate: | |||
on-profile: local | |||
import: optional:application-secret.properties |
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.
이런 방법이 있었군요..ㄷㄷ
🌱 관련 이슈
📌 작업 내용 및 특이사항
[예외 클래스 관련 안내 사항]
[성공 관련 안내 사항]
return ApiResponse.success(SuccessType, data);
형식으로 처리하시면 되겠습니다.return ResponseEntity.created(location).build();
로 처리하시면 됩니다.return ResponseEntity.noContent().build();
로 처리하시면 되겠습니다.📝 참고사항
[BaseException 클래스 다이어그램]
[API 공통 응답 테스트]
📚 기타