chore: add JPA Auditing and BaseEntity configuration#15
Conversation
WalkthroughSpring Data JPA 감사 메커니즘을 구현하는 새로운 기본 엔티티 클래스와 설정을 추가합니다. 생성/수정 타임스탬프와 사용자 정보를 자동으로 추적하며, 인증된 사용자를 제공하는 AuditorAware 구현을 포함합니다. Changes
Sequence DiagramsequenceDiagram
participant App as 애플리케이션
participant JPA as Spring Data JPA
participant Listener as AuditingEntityListener
participant Config as AuditConfig
participant Aware as AuditorAwareImpl
participant Security as SecurityContextHolder
App->>Config: 애플리케이션 시작
Config->>JPA: `@EnableJpaAuditing` 설정
Config->>Aware: auditorAwareProvider() 빈 등록
App->>JPA: 엔티티 저장/수정
JPA->>Listener: 엔티티 변경 감지
Listener->>Aware: 현재 감사자 조회
Aware->>Security: 인증된 사용자 조회
Security-->>Aware: 사용자 정보 또는 "anonymous"
Aware-->>Listener: Optional<String> 반환
Listener->>Listener: createdAt/updatedAt 타임스탬프 설정
Listener->>Listener: createdBy/updatedBy 사용자명 설정
Listener-->>JPA: 감사 정보 적용
JPA-->>App: 엔티티 저장 완료
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: Path: .coderabbit.yml Review profile: CHILL Plan: Pro 📒 Files selected for processing (4)
🧰 Additional context used📓 Path-based instructions (2)**/*.kt⚙️ CodeRabbit configuration file
Files:
**/entity/**/*.kt⚙️ CodeRabbit configuration file
Files:
🔇 Additional comments (4)
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. Comment |
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
📋 Pull Request
📌 관련 이슈
#14
📝 변경 사항 요약
엔티티 생성/수정 시간 및 사용자 자동 관리를 위한 JPA Auditing 설정
🔄 변경 유형
✅ 체크리스트
💬 기타
클래스 구조
사용 방법
Summary by CodeRabbit
새 기능
✏️ Tip: You can customize this high-level summary in your review settings.