refactor: Pomodoro, StudyLog 기능 전반 Kotlin 마이그레이션(#120) #121
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 포맷팅 설정 추가🌱 관련 이슈
🔍 참고사항(선택)
📚 기타(선택)