Skip to content

Conversation

@jaejoong0529
Copy link
Collaborator

@jaejoong0529 jaejoong0529 commented Dec 30, 2025

🔎 작업 내용

  • 아바타 프로필을 DB로 마이그레이션
  • CacheConfig 추가 (Redis 캐싱, TTL 1시간)
  • 스웨거에서 한글 깨짐 현상 해결

➕ 이슈 링크

📸 스크린샷

😎 리뷰 요구사항

🧑‍💻 예정 작업

📝 체크리스트

  • 브랜치 이름은 feature/개발내용 형식으로 작성했는가?
  • 커밋 메시지는 feat: 커밋 내용 형식으로 작성했는가?
  • 작업 전 Issue를 작성했는가?
  • dev 브랜치로 병합을 요청했는가?
  • 불필요한 주석과 공백은 제거했는가?
  • 코드 리뷰어의 피드백을 반영했는가?
  • 테스트를 진행했는가?
  • 테스트 코드를 작성했는가?

Copy link

Copilot AI left a 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) with AvatarProfileService (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.

@GIL-DONG-MU GIL-DONG-MU deleted a comment from Copilot AI Dec 30, 2025
Copy link
Contributor

@shinheekim shinheekim left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

수고하셨습니다~~!

@shinheekim shinheekim merged commit 3c5b311 into dev Dec 30, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🔧 BE ✨ feature 새 기능 개발 / 요구사항

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEAT] 아바타 프로필을 DB로 마이그레이션

3 participants