refactor(common): 인프라 설정 common 패키지로 분리 refs #39 #41
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.
목적
변경 요약
핵심 변경사항
패키지 구조 개선
이동된 컴포넌트
Import 경로 일괄 변경
주요 파일/모듈
아키텍처 설계 결정사항
1. Common 패키지 분리 기준
도메인 독립적인 인프라 컴포넌트만 이동
이 기준을 선택한 이유:
2. 점진적 마이그레이션 전략
Phase 1만 진행 (본 PR)
이 전략을 선택한 이유:
영향도 분석
Backend
Database
테스트
마이그레이션
패키지 구조 비교
Before (기존 구조)
```
com.teambind.supportserver/
├── report/
│ ├── config/
│ │ ├── QueryDslConfig.java ❌ report에만 존재
│ │ └── IdConfig.java ❌ report에만 존재
│ └── utils/
│ ├── IdGenerator.java ❌ report에만 존재
│ └── Snowflake.java ❌ report에만 존재
├── faq/
└── inquiries/
└── repository/
└── InquiryRepositoryTest.java
// @import(com.teambind.supportserver.report.config.QueryDslConfig.class)
// ❌ report 패키지에 의존
```
After (개선된 구조)
```
com.teambind.supportserver/
├── common/ ✅ 새로 생성
│ ├── config/
│ │ ├── QueryDslConfig.java ✅ 모든 도메인에서 사용
│ │ └── IdConfig.java ✅ 모든 도메인에서 사용
│ └── utils/
│ ├── IdGenerator.java ✅ 모든 도메인에서 사용
│ └── Snowflake.java ✅ 모든 도메인에서 사용
├── report/
├── faq/
└── inquiries/
└── repository/
└── InquiryRepositoryTest.java
// @import(com.teambind.supportserver.common.config.QueryDslConfig.class)
// ✅ 의미적으로 명확한 경로
```
수용 기준 검증
#39 Change Request - AC 충족
기대 효과 달성
브레이킹/마이그레이션
테스트
전체 테스트 실행
```bash
cd SupportServer
./gradlew clean test
결과:
BUILD SUCCESSFUL in 12s
285 tests passed
0 tests failed
```
영향받은 테스트 검증
```bash
Inquiries 도메인 테스트
./gradlew test --tests "com.teambind.supportserver.inquiries.repository.*"
✅ InquiryRepositoryTest: 13 tests passed
✅ AnswerRepositoryTest: 14 tests passed
Report 도메인 테스트
./gradlew test --tests "com.teambind.supportserver.report.repository.*"
✅ ReportRepositoryTest: 8 tests passed
✅ ReportCategoryRepositoryTest: 12 tests passed
```
참조