refactor: Pomodoro, StudyLog 기능 전반 Kotlin 마이그레이션(#120)#121
Merged
chaiminwoo0223 merged 1 commit intodevelopfrom Dec 17, 2025
Merged
refactor: Pomodoro, StudyLog 기능 전반 Kotlin 마이그레이션(#120)#121chaiminwoo0223 merged 1 commit intodevelopfrom
chaiminwoo0223 merged 1 commit intodevelopfrom
Conversation
* feat: PomodoroQueryService.kt, PomodoroCommandService.kt 구현 * feat: PomodoroRepository.kt, PomodoroJpaRepository.kt, PomodoroRepositoryAdapter.kt 구현 * feat: PomodoroErrorCode.kt, PomodoroPolicy.kt 구현 * feat: PomodoroFactory.kt 구현 * feat: StudyLogController.kt 구현 * feat: StudyLogFacade.kt 구현 * feat: StudyLogQueryService.kt, StudyLogCommandService.kt 구현 * feat: StudyLogRepository.kt, StudyLogJpaRepository.kt, StudyLogRepositoryAdapter.kt 구현 * feat: StudyLogErrorCode, StudyLogPolicy 구현 * feat: StudyLogFactory.kt 구현 * feat: CreatePomodoroRequest.kt DTO 추가 * feat: PomodoroInfo.kt DTO 추가 * feat: CreateStudyLogRequest.kt, PresignStudyLogImageRequest.kt, ConfirmStudyLogImageRequest.kt DTO 추가 * feat: CreateStudyLogResponse.kt, PresignedStudyLogImageResponse.kt, LoadStudyLogsSliceResponse.kt DTO 추가 * feat: StudyLogInfo.kt, StudyLogDetail.kt, StudyLogSliceInfo.kt, PresignedStudyLogImageInfo.kt DTO 추가 * refactor: Kotlin–Java 혼용 환경에서 안정적인 접근을 위해 도메인 엔티티에 명시적 getter 추가 * refactor: Kotlin–Java 혼용 환경에서 안정적인 접근을 위해 BaseTimeEntity에 명시적 getter 추가 * refactor: record → data class 전환에 따른 DTO 접근자 호출 방식(x() → getX()) 수정 * refactor: Policy에서 삭제 여부 판단을 위해 BaseTimeEntity에 isDeleted 메서드 추가 * refactor: java pomodoro presentation, application 패키지 제거 (Kotlin 마이그레이션 완료) * refactor: java pomodoro domain factory, policy, error 패키지 제거 (Kotlin 마이그레이션 완료) * refactor: java pomodoro infra jpa 패키지 제거 (Kotlin 마이그레이션 완료) * refactor: java studyLog presentation 패키지 제거 (Kotlin 마이그레이션 완료) * refactor: java studyLog application facade 패키지 제거 (Kotlin 마이그레이션 완료) * refactor: java studyLog domain error, policy 패키지 제거 (Kotlin 마이그레이션 완료) * test: PomodoroFixture.kt, CreatePomodoroRequestFixture.kt 추가 * test: PomodoroTestHelper.kt 추가 * test: PomodoroQueryServiceTest.kt, PomodoroCommandServiceTest.kt 단위 테스트 추가 * test: test java pomodoro 패키지 제거 (Kotlin 마이그레이션 완료) * test: StudyLogFixture.kt, CreateStudyLogRequestFixture.kt, PresignStudyLogImageRequestFixture.kt, ConfirmStudyLogImageRequestFixture.kt 추가 * test: StudyLogTestHelper.kt 추가 * test: StudyLogQueryServiceTest, StudyLogCommandServiceTest 단위 테스트 추가 * test: StudyLogControllerIntegrationTest 통합 테스트 추가 * test: TokenFixture에 authorization 정적 메서드 추가 * test: StampTestHelper에 getStamp 정적 메서드 추가 * chore: build.gradle에 Kotlin 환경 설정 추가 * chore: build.gradle에 Spotless Kotlin 포맷팅 설정 추가
hisonghy
approved these changes
Dec 17, 2025
Contributor
hisonghy
left a comment
There was a problem hiding this comment.
정말 고생많으셨습니다!
코틀린으로 마이그레이션 하면서 마지막에 도메인 엔티티까지 마이그레이션하면 될 것 같아요!
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.
📌 작업 내용 및 특이사항
✅ Java → Kotlin 마이그레이션 개요
Pomodoro,StudyLog전반을 Java → Kotlin으로 마이그레이션했습니다.Kotlin–Java 혼용 환경에서도 안정적으로 동작하도록 구조를 정리하는 데 초점을 맞췄습니다.정적 팩토리 메서드(of)와도메인 책임 구조(Factory, Policy, Service, Facade)를 최대한 유지했습니다.✅ 테스트 코드 Kotlin 마이그레이션
Pomodoro/StudyLog 테스트 코드를 Kotlin으로 전환했습니다.누락된 케이스(완료 상태 검증)를 추가했습니다.접근자 차이(getter 인식 문제, record → data class 전환에 따른 호출 방식 변화 등)를 테스트 단계에서 먼저 확인했습니다.object사용을 지양하고,class + DSL(withXXX) 패턴으로 통일하여 테스트 간 상태 공유 문제를 해결했습니다.✅ Kotlin–Java 혼용 환경에서 발생한 주요 이슈 및 대응
Java + Lombok 기반 엔티티를 Kotlin에서 접근하는 과정에서 필드 접근 오류 및 getter 인식 문제가 다수 발생했습니다.private / protected 필드를 Lombok에 의존하던 구조에서, Kotlin 컴파일러가 필드 접근으로 오해하여 컴파일 에러가 발생했습니다.도메인 엔티티,BaseTimeEntity에 명시적 getter를 직접 추가하여 문제를 해결했습니다.isDeleted() 메서드를 BaseTimeEntity에 추가했습니다.✅ record → data class 전환 시 주의사항 반영
Java record를Kotlin data class로 전환하면서, 기존x()방식 접근이 Kotlin/Java 혼용 환경에서는getX()접근으로 변경되어야 했습니다.✅ 도메인 엔티티 및 QueryDSL 리포지토리를 마이그레이션하지 않은 이유
compileJava와compileKotlin이 함께 동작합니다.✅ Pomodoro 도메인 Kotlin 마이그레이션
PomodoroQueryService,PomodoroCommandServiceKotlin 전환PomodoroRepository,PomodoroJpaRepository,PomodoroRepositoryAdapterKotlin 전환PomodoroErrorCode,PomodoroPolicy,PomodoroFactoryKotlin 전환✅ StudyLog 도메인 Kotlin 마이그레이션
StudyLogController,StudyLogFacadeKotlin 전환StudyLogQueryService,StudyLogCommandServiceKotlin 전환StudyLogRepository,StudyLogJpaRepository,StudyLogRepositoryAdapterKotlin 전환StudyLogErrorCode,StudyLogPolicy,StudyLogFactoryKotlin 전환✅ DTO Kotlin 마이그레이션
CreatePomodoroRequest,PomodoroInfoKotlin 전환CreateStudyLogRequest,PresignStudyLogImageRequest,ConfirmStudyLogImageRequestKotlin 전환CreateStudyLogResponse,PresignedStudyLogImageResponse,LoadStudyLogsSliceResponseKotlin 전환StudyLogInfo,StudyLogDetail,StudyLogSliceInfo,PresignedStudyLogImageInfoKotlin 전환✅ 빌드 및 포맷팅 환경 정리
build.gradle에 Kotlin 환경 설정 추가SpotlessKotlin 포맷팅 설정 추가🌱 관련 이슈
🔍 참고사항(선택)
📚 기타(선택)