Conversation
feat/draft: springboot 실행 시 elasticsearch에서 player-index자동 생성 및 선수 캐싱 기능 수정
hotfix - 주소들 수정
|
Caution Review failedThe pull request is closed. Walkthrough애플리케이션 시작 시 Elasticsearch 인덱스(player-index) 존재 여부를 확인하고 없으면 리소스의 JSON 매핑으로 생성합니다. 플레이어 캐시 로직은 Redis 저장과 함께 Elasticsearch에도 동기 저장하도록 확장되었습니다. WebSocket과 OAuth2 리다이렉트의 프런트엔드 URL 설정은 HTTPS 속성/환경변수를 사용하도록 변경되었습니다. 새 인덱스 매핑 JSON이 추가되었습니다. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
participant App as Application
participant Init as PlayerIndexInitializer
participant ES as Elasticsearch
App->>Init: @PostConstruct
Init->>ES: Check index "player-index" exists
alt Not exists
Init->>App: Load elasticsearch/player-index.json
Init->>ES: Create index with settings/mappings
ES-->>Init: Created
else Exists
ES-->>Init: Exists
end
sequenceDiagram
autonumber
participant Client as Service Caller
participant Cache as PlayerCacheService
participant DB as PlayerRepository
participant Redis as Redis
participant ES as Elasticsearch
Client->>Cache: getPlayersFromRedis()
Cache->>Redis: GET players
alt Cache miss
Cache->>DB: Load players
DB-->>Cache: Entities
Cache->>Cache: Convert to DTOs
Cache->>Redis: SET players
Cache->>ES: saveAll(Documents)
ES-->>Cache: Ack
else Cache hit
Redis-->>Cache: Players DTOs
end
Cache-->>Client: Players DTOs
sequenceDiagram
autonumber
participant User as User
participant OAuth as OAuth2SuccessHandler
participant FE as Frontend (HTTPS URL)
User->>OAuth: OAuth2 login success
OAuth->>OAuth: Build redirect = frontendHttpsUrl + "/auth/callback?accessToken=..."
OAuth-->>User: Redirect to FE
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI 💡 Knowledge Base configuration:
You can enable these sources in your CodeRabbit configuration. 📒 Files selected for processing (5)
✨ Finishing Touches
🧪 Generate unit tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR/Issue comments)Type Other keywords and placeholders
CodeRabbit Configuration File (
|
Summary by CodeRabbit