Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
요약
공통 응답 형식
성공한 경우와 예외가 발생한 경우를 구분하여 응답합니다.
{ "status" : 200, "data" : "API 응답 결과" } { "status" : 403, "message" : "접근 권한이 없습니다." }모든 API에서 반환 값을 변경하지 않고, ResponseBodyAdvice를 활용하여 응답 본문만 수정하도록 구현하였습니다. 직접 핸들링하는 예외는 예외적으로 별도 처리가 가능합니다.
Spring Security 예외 응답
AccessDeniedHandler,AuthenticationEntryPoint를 구현하여 Spring Security의 인증 및 인가 관련 예외가 발생했을 때, 공통 응답 형식으로 반환되도록 처리했습니다.인증 관련 API 인터페이스 변경
휴대폰과이메일로 분기되도록 구성했습니다.공통 응답 형식 적용 범위 지정
dev.bang.pickcar패키지인지 확인하는 부분을 추가했습니다.위처럼 프로젝트의 API가 아닌 Swagger의 예시 API(PetStore)가 노출되었습니다. (수정 완료했습니다.)