Conversation
Closed
📊 코드 커버리지 리포트
|
minibr
approved these changes
Dec 26, 2025
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 설명
Link도메인의 유지보수성과 재사용성을 높이기 위해 전반적인 아키텍처 리팩토링을 진행했습니다.작업 내용
1. 검증 책임의 이동 (
Controller->Api)LinkController에 존재하던@Valid,@Min,@Max등의 검증 어노테이션을 **인터페이스(LinkApi)**로 모두 이동시켰습니다. 이에 대한 판단 근거는 다음과 같습니다.1. 계약에 의한 설계 (Design by Contract)
How)이 아닌 명세 단계(What)에서 선언되는 것이 아키텍처 관점에서 적합하다고 판단했습니다.2. JSR-380 표준 준수 및 충돌 방지
ConstraintDeclarationException이 발생할 위험이 있습니다.3. Spring AOP 프록시 동작 보장
@Validated는 Spring AOP 기반으로 동작합니다. JDK Dynamic Proxy가 인터페이스를 기반으로 생성될 때, 인터페이스에 명시된 제약 조건이 있어야 프록시가 올바르게 검증 로직을 가로챌 수 있습니다.2. API 응답 구조 통일 (
LinkController)ResponseEntity제거:ResponseEntity<BaseResponse<T>>BaseResponse<T>직접 반환3. Service 계층 반환 타입 변경 (
LinkService)LinkService가LinkRes(DTO)를 반환.LinkService는 **Link(Entity)**를 반환하도록 수정.4. Facade 계층 역할 강화 (
LinkFacade)Service로부터 반환받은Entity를Facade에서DTO로 변환하여Controller로 전달Facade메서드에@Transactional을 적용하여,Entity를DTO로 변환하는 시점까지 영속성 컨텍스트를 유지하도록 수정