-
Notifications
You must be signed in to change notification settings - Fork 2
feat: 아바타 프로필을 DB로 마이그레이션 #132
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR migrates avatar profile data from a hardcoded in-memory Map to a database-backed solution with Redis caching, while also addressing Korean character encoding issues in Swagger documentation and database connections.
- Replaces
AvatarProfileProvider(hardcoded Map) withAvatarProfileService(database + cache) - Adds Redis caching with 1-hour TTL for avatar profiles to optimize frequent lookups
- Fixes Korean character encoding in Swagger UI and MySQL connection strings
Reviewed changes
Copilot reviewed 14 out of 14 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
src/main/java/com/dduru/gildongmu/survey/service/AvatarProfileService.java |
New service that retrieves avatar profiles from database with Redis caching |
src/main/java/com/dduru/gildongmu/survey/service/AvatarProfileProvider.java |
Removed hardcoded avatar profile provider |
src/main/java/com/dduru/gildongmu/survey/domain/AvatarProfile.java |
New entity to store avatar profiles in database with JSON tags column |
src/main/java/com/dduru/gildongmu/survey/repository/AvatarProfileRepository.java |
New repository interface for avatar profile database access |
src/main/java/com/dduru/gildongmu/survey/exception/AvatarProfileNotFoundException.java |
New exception for missing avatar profiles |
src/main/java/com/dduru/gildongmu/config/CacheConfig.java |
New Redis cache configuration with 1-hour TTL |
src/main/java/com/dduru/gildongmu/config/WebMvcConfig.java |
Added UTF-8 charset configuration for HTTP message converters |
src/main/java/com/dduru/gildongmu/survey/service/SurveyService.java |
Updated to use new AvatarProfileService instead of AvatarProfileProvider |
src/main/java/com/dduru/gildongmu/survey/dto/SurveyResponse.java |
Updated to use AvatarProfileService and retrieve description from profile instead of enum |
src/main/java/com/dduru/gildongmu/survey/domain/enums/AvatarType.java |
Removed getDescription() method as descriptions now come from database |
src/main/java/com/dduru/gildongmu/common/exception/ErrorCode.java |
Added AVATAR_PROFILE_NOT_FOUND error code |
src/main/resources/application.yml |
Added charset=UTF-8 to Swagger media type configurations |
src/main/resources/application-dev.yml |
Added UTF-8 encoding and timezone parameters to MySQL connection URL |
src/test/java/com/dduru/gildongmu/survey/service/SurveyServiceTest.java |
Updated tests to use AvatarProfileService with new description field |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
src/main/java/com/dduru/gildongmu/survey/service/AvatarProfileService.java
Outdated
Show resolved
Hide resolved
shinheekim
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
수고하셨습니다~~!
🔎 작업 내용
➕ 이슈 링크
📸 스크린샷
😎 리뷰 요구사항
🧑💻 예정 작업
📝 체크리스트
feature/개발내용형식으로 작성했는가?feat: 커밋 내용형식으로 작성했는가?dev브랜치로 병합을 요청했는가?