Merged
Conversation
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
📋 PR 개요
GET /api/notificationsAPI 호출 시 하이버네이트 지연 로딩 프록시 객체로 인해 발생하던 Jackson JSON 직렬화 오류 (InvalidDefinitionException)를 해결합니다. 엔티티 대신 DTO를 사용하도록 수정하고 관련 코드를 정리합니다.💻 주요 변경 사항
NotificationResponseDTO 추가:NotificationResponseDTO 클래스를 생성했습니다.fromEntity정적 팩토리 메소드를 포함합니다.NotificationService수정:getUserNotifications메소드의 반환 타입을List<Notification>에서List<NotificationResponse>로 변경하고, 내부에서 DTO 변환 로직을 수행하도록 수정했습니다.markAsRead메소드에@Transactional을 추가하고 코드를 정리했습니다.NotificationController수정:getMyNotifications메소드의 반환 타입을ResponseEntity<List<NotificationResponse>>로 변경하여 DTO를 반환하도록 수정했습니다.markAsRead메소드의 반환 타입을ResponseEntity<Void>로 변경했습니다.@ApiResponses,@Parameter,@SecurityRequirement등)을 추가/개선하여 API 문서를 명확하게 했습니다.🔗 관련 이슈