템플릿 조회 구조와 테스트 계약 정리#117
Merged
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.
개요
템플릿 조회 경로와 테스트 구성을 정리했습니다. 템플릿 목록/상세 조회가 별도의 read-side wrapper와 전용 JPA repository를 거치면서 실제 도메인 계약보다 구현 레이어를 더 많이 고정하고 있었고, 일부 구조 테스트도 특정 클래스명 존재 여부나 테스트 파일 위치 같은 스냅샷을 보호하고 있었습니다.
이번 변경에서는 템플릿 조회를
Templatesaggregate repository 중심으로 단순화하고, 테스트는 설계 규칙과 외부 계약을 설명하는 이름과 범위로 정리했습니다. 동시에 getter/기본 생성자/생성자 주입처럼 의미가 분명한 반복 코드는 Lombok으로 줄였습니다.변경 사항
TemplateListReader,TemplateDetail,TemplateSummaryResponse, 전용 JPA list reader/repository를 제거했습니다.FindTemplates와TemplateDetailResponse가Templateaggregate를 직접 사용하도록 정리했습니다.Templates.findById,findAll에@EntityGraph(attributePaths = "players")를 적용해 조회 후 응답 매핑에서 선수 컬렉션을 안정적으로 사용할 수 있게 했습니다.TemplateConfiguration.from과 사용하지 않는 draft position limit 오류를 제거했습니다.CoreException,InvalidDomainStateException,SettleAuction, JPA embeddable/value object의 반복 getter/기본 생성자 코드를 Lombok으로 줄였습니다.AS-IS / TO-BE
AS-IS
TO-BE
Templates와Templateaggregate를 중심으로 흐릅니다.리뷰 포인트
Templates에 추가한@EntityGraph가 템플릿 상세/목록 응답에서 필요한 선수 컬렉션 로딩 범위로 충분한지 봐주세요.ApplicationModules.verify()와 internal package isolation 규칙으로 충분한지 확인해 주세요.검증
./gradlew check./gradlew integrationTestgit diff --check