Conversation
myqewr
approved these changes
Apr 11, 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.
🌱 관련 이슈
📌 작업 내용 및 특이사항
[ 그루밍 테스트 목록 조회 기능 ]
LoadGroomingTestsService에서@Cacheable어노테이션을 분리했습니다. 캐싱도 외부 기술이므로 외부 기술 의존성을 없애고자LoadGroomingTestsWithCachePort와CaffeineCacheAdapter로 분리하고 Adapter 구현체에서 캐싱을 관리하도록 리팩토링 했습니다.Redis->Caffeine으로 바꾸게 되면서 기존 그루밍 테스트 목록을 조회할 때 랜덤으로 응답되지 않는 이슈가 발생했습니다.Redis는 캐싱된 데이터를 읽어올 때 역직렬화를 통해 가져오기 때문에 Set 의 순서가 항상 랜덤하게 응답되었는데,Caffeine캐시는 로컬 캐시로 직렬화, 역직렬화를 하지 않고 객체 자체를 저장하기 때문에 조회할 때마다 순서가 랜덤하지 않아 port 를 통해 고정된 순서의 그루밍 테스트 목록 캐싱 데이터를 가져오고 이후에Collections.shuffle()로 랜덤한 순서를 보장하도록 했습니다.[ 그루밍 테스트 유효성 검증 기능 ]
GroomingTestValidator클래스를 추가했습니다. (유효한 질문/답변 ID 여부, 중복된 질문/답변 존재 여부, 질문/답변 올바른 매핑 여부)UseCase에 종속되지 않고 도메인 정책의 일관된 검증을 담당하는 독립적인 애플리케이션 서비스로 도메인 로직 기반의 일관된 검증을 담당하고application.service.grooming계층 내에서 재사용 가능한 컴포넌트로 설계했습니다.[ 그루밍 테스트 제출 기능 ]
POST /api/grooming/tests그루밍 테스트 결과를 저장하는 api가 이미 존재하고 제출(완료)와 저장의 역할을 명확히 분리하고자 그루밍 테스트 제출 api 에서는 인증된 유저든 인증되지 않은 유저든 오로지 그루밍 테스트에 대한 결과 (점수, 등급, 레벨) 계산만 담당하도록 리팩토링 했습니다.[ 그루밍 테스트 결과 저장 기능 ]
🔍 참고사항
📚 기타