feat(faq): FAQ 조회 시스템 구현 (캐싱 및 스케줄링) refs #20 #21 #22 #35
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.
목적
변경 요약
핵심 기능
FAQ 엔티티 및 카테고리
캐싱 전략
스케일 아웃 환경 고려
REST API 설계
주요 파일/모듈
Faq,FaqCategoryenumFaqRepositoryFaqService(캐싱, 스케줄링, 동시성 제어)FaqControllerSupportServerApplication(@EnableScheduling)FaqServiceTest,FaqControllerTestAPI 명세
1. FAQ 목록 조회 (GET /api/v1/faqs)
Query Parameters:
category: FAQ 카테고리 (선택, 기본값: ALL)Response (200 OK):
[ { "id": 1, "category": "RESERVATION", "title": "예약 관련", "question": "예약은 어떻게 하나요?", "answer": "앱에서 예약 가능합니다.", "createdAt": "2025-10-16T10:00:00", "updatedAt": "2025-10-16T10:00:00" }, { "id": 2, "category": "CHECK_IN", "title": "체크인 안내", "question": "체크인 시간은 언제인가요?", "answer": "오후 3시부터 가능합니다.", "createdAt": "2025-10-16T10:00:00", "updatedAt": "2025-10-16T10:00:00" } ]예시:
2. FAQ 캐시 수동 갱신 (POST /api/v1/faqs/refresh)
관리자용 API - 캐시를 즉시 갱신할 때 사용
Response (200 OK):
수용 기준 검증
#8 FAQ 데이터 모델 및 카테고리 설계 - AC 충족
#9 FAQ 조회 API 구현 - AC 충족
추가 기능 요구사항
테스트 커버리지
FaqServiceTest: 11개 테스트
FaqControllerTest: 11개 테스트
전체 테스트: 22개 테스트 추가
브레이킹/마이그레이션
faq테이블 생성 (title 필드 포함)테스트
단위 테스트
수동 검증 방법
아키텍처 개선 사항
캐싱 전략
로컬 메모리 캐싱:
자동 갱신 스케줄러:
동시성 제어:
스케일 아웃 고려사항
각 인스턴스가 독립적인 캐시 유지
데이터 정합성
성능 개선 사항
변경 이력
참조