refactor: Stamp, DailyGoal, Trip 기능 전반 Kotlin 마이그레이션(#126) #127
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.
📌 작업 내용 및 특이사항
✅ 변경 범위가 커진 이유
기존(약 110~120개)대비 크게 증가했습니다.Trip,Stamp가 현재 서비스 전반에서 공통적으로 사용되는 핵심 도메인이기 때문입니다.마이그레이션 과정에서 관련 파일들이 함께 변경되었습니다.추가/변경된 파일 위주로 확인해 주시면 감사하겠습니다.✅ Java → Kotlin 마이그레이션 개요
Stamp,DailyGoal,Trip전반을 Java → Kotlin으로 마이그레이션했습니다.Kotlin–Java 혼용 환경에서도 안정적으로 동작하도록 구조를 정리하는 데 초점을 맞췄습니다.정적 팩토리 메서드(of, from)와도메인 책임 구조(Factory, Policy, Service, Facade)를 최대한 유지했습니다.✅ 테스트 코드 Kotlin 마이그레이션
접근자 차이(getter 인식 문제, record → data class 전환에 따른 호출 방식 변화 등)를 테스트 단계에서 먼저 확인했습니다.object사용을 지양하고,class + DSL(withXXX) 패턴으로 통일하여 테스트 간 상태 공유 문제를 해결했습니다.✅
@JvmStatic적용으로 인한 Java ↔ Kotlin 정적 호출 문제 해결object에 정의된 메서드는 JVM 레벨에서 기본적으로INSTANCE.create()형태로 노출됩니다.xxxFactory.create()형태의정적(static) 호출 방식을 사용하고 있었습니다.@JvmStatic을 적용하여,create()메서드가 JVM 레벨의 static 메서드로 노출되도록 변경하여 문제를 해결했습니다.@JvmStatic을 제거할 예정입니다.✅ Stamp 도메인 Kotlin 마이그레이션
StampControllerKotlin 전환StampFacade,StampQueryService,StampCommandServiceKotlin 전환StampRepository,StampJpaRepository,StampRepositoryAdapterKotlin 전환StampErrorCode,StampPolicyKotlin 전환StampFactoryKotlin 전환✅ DailyGoal 도메인 Kotlin 마이그레이션
DailyGoalControllerKotlin 전환DailyGoalFacade,DailyGoalQueryService,DailyGoalCommandServiceKotlin 전환DailyGoalRepository,DailyGoalJpaRepository,DailyGoalRepositoryAdapterKotlin 전환DailyGoalErrorCode,DailyGoalPolicyKotlin 전환DailyGoalFactoryKotlin 전환✅ Trip 도메인 Kotlin 마이그레이션
TripControllerKotlin 전환TripFacade,TripQueryService,TripCommandServiceKotlin 전환TripRepository,TripJpaRepository,TripRepositoryAdapterKotlin 전환TripErrorCode,TripPolicyKotlin 전환TripFactoryKotlin 전환✅ DTO Kotlin 마이그레이션
Stamp Application DTO:
StampInfo,StampsInfo,StampDetailKotlin 전환Stamp Presentation Reqeust DTO:
CreateStampRequest,UpdateStampRequest,UpdateStampOrderRequestKotlin 전환Stamp Presentation Response DTO:
CreateStampResponse,LoadStampInfoResponse,LoadStampDetailResponseKotlin 전환DailyGoal Application DTO:
DailyGoalInfo,DailyGoalDetailKotlin 전환DailyGoal Presentation Reqeust DTO:
CreateDailyGoalRequest,UpdateDailyGoalRequestKotlin 전환DailyGoal Presentation Response DTO:
CreateDailyGoalResponse,LoadDailyGoalDetailResponseKotlin 전환Trip Application DTO:
CategoryInfo,TripInfo,TripDetail,TripSliceInfo,TripCountKotlin 전환Trip Presentation Reqeust DTO:
CreateTripRequest,UpdateTripRequestKotlin 전환Trip Presentation Response DTO:
CreateTripResponse,LoadTripCategoryResponse,LoadTripsSliceResponse,LoadTripDetailResponseKotlin 전환🌱 관련 이슈
🔍 참고사항(선택)
📚 기타(선택)