Skip to content

T-01 공통 기반 정비 - #56

Open
ff1451 wants to merge 1 commit into
mainfrom
feat/t01-common-foundation
Open

T-01 공통 기반 정비#56
ff1451 wants to merge 1 commit into
mainfrom
feat/t01-common-foundation

Conversation

@ff1451

@ff1451 ff1451 commented Aug 19, 2026

Copy link
Copy Markdown

Refs #13

배경

최초 계획은 백지 스켈레톤을 전제로 Flyway·springdoc·Security·Testcontainers 도입을 이 태스크에 넣었다. 그 사이 auth·member 도메인이 머지되어 전부 이미 있다. 이 PR은 남은 것만 한다.

변경

  • 의존성: jsoup, software.amazon.awssdk:s3. s3-presigner는 추가하지 않았다 — Maven Central에 그 좌표가 존재하지 않는다(curl로 404 확인, Maven Central 검색 0건). 해당 버전대의 AWS SDK는 S3Presigners3 모듈에 통합했다(jar 안에 software/amazon/awssdk/services/s3/presigner/* 확인).
  • S3Config/S3Properties — 기존 SesClientConfig 패턴 그대로. 버킷명 등 업로드 기능 자체는 T-17 범위라 넣지 않았다.
  • GlobalException/GlobalExceptionType — 도메인에 속하지 않는 공유 예외. 순서 변경 검증(DisplayOrders)이 트랙·커리큘럼·활동에서 동일한 규칙·동일한 400을 쓰므로 도메인마다 ORDER_MISMATCH를 중복 정의하지 않았다.
  • DisplayOrdersdisplay_order 재부여 순수 함수. 요청 id 집합이 대상과 다르면(중복·누락·추가) 예외를 던지고 아무 값도 반환하지 않는다 — 순수 함수라 "일부만 적용된 상태"가 애초에 존재할 수 없다(INV-3, INV-4, AC-1.5).
  • SoftDeletableEntity — 최상위 엔티티 전용(ADR-006). @SQLRestriction은 매핑된 슈퍼클래스에서 상속되지 않으므로, 이 클래스를 쓰는 각 엔티티가 직접 붙여야 한다고 Javadoc에 명시했다.
  • Track/Curriculum/Activity/Media ExceptionType 스켈레톤 — 아직 호출하는 컨트롤러가 없다. 각 도메인 티켓(T-06/T-10/T-14/T-17)이 첫 엔드포인트를 만들 때 항목을 늘린다. 지금은 계약(상태 코드·메시지·withDetail)만 테스트로 고정했다.
  • IntegrationTestSupport — Testcontainers 공식 "싱글턴 컨테이너" 패턴(@Testcontainers/@Container 대신 정적 초기화 블록에서 1회 기동). 기존 7개 클래스는 각자 컨테이너를 띄우는 방식 그대로 두었다 — 이전은 auth·member 파일을 건드리므로 선택적 후속 작업.

로컬 환경에서 발견한 것 (참고)

  • 이 저장소는 JDK 21 툴체인을 요구하는데 로컬에 JDK 17만 있었다. brew install openjdk@21 + ~/.gradle/gradle.propertiesorg.gradle.java.installations.paths 등록으로 해결했다(레포에는 커밋하지 않음, 개인 환경 설정).

테스트

./gradlew test28개 전체 통과, 실패 0.

클래스 개수
기존 7개 (auth 4, member 2, 컨텍스트 로딩 1) 16
DisplayOrdersTest (신규) 5
BcsdExceptionTypeContractTest (신규) 6
HealthCheckIntegrationTest (신규, IntegrationTestSupport 검증 겸) 1

하지 않은 것

  • Flyway/springdoc/Security/Testcontainers 도입 (이미 있음)
  • ProblemDetail 도입 (기존 ErrorResponse(message) 관례 유지 — ADR-022)
  • 기존 7개 테스트 클래스의 IntegrationTestSupport 이전

Flyway·springdoc·Security·Testcontainers·BaseTimeEntity는 이미 있어(auth·member
머지) 재구현하지 않고, 남은 것만 추가한다.

- jsoup, software.amazon.awssdk:s3 의존성 추가
  (s3-presigner는 별도 아티팩트가 없다 — S3Presigner가 s3 모듈에 통합되어 있다)
- S3Config/S3Properties — SesClientConfig 패턴 준용
- GlobalException/GlobalExceptionType — 도메인에 속하지 않는 공유 예외(순서 불일치)
- DisplayOrders — display_order 재부여 순수 함수 (INV-3, INV-4)
- SoftDeletableEntity — 최상위 엔티티 전용 soft delete 베이스 (하위 트리는 미적용)
- Track/Curriculum/Activity/Media ExceptionType 스켈레톤
  (아직 호출하는 컨트롤러가 없다 — 각 도메인 티켓에서 항목이 늘어난다)
- IntegrationTestSupport — Testcontainers 싱글턴 컨테이너 패턴
  (기존 7개 클래스는 각자 컨테이너를 띄운다. 이 베이스로의 이전은 선택적 후속 작업)

테스트: 28개 전체 통과 (기존 7클래스 + 신규 3클래스: DisplayOrders 5,
BcsdExceptionType 계약 6, HealthCheck 스모크 1).

Refs #13
@coderabbitai

coderabbitai Bot commented Aug 19, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@ff1451, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 34 minutes

Limit details: You’ve used the included review currently available.

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits within each organization.

For paid Pro and Pro+ reviews, CodeRabbit uses a developer's included PR review attempts over the past 7 days to set the current hourly allowance. At typical activity levels, the full plan allowance applies. Higher sustained activity can lower the allowance until earlier attempts leave the 7-day window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 14845239-4ec4-4ccc-8555-ae434fff8bbe

📥 Commits

Reviewing files that changed from the base of the PR and between 78d9ad5 and 3d6de5c.

📒 Files selected for processing (20)
  • build.gradle.kts
  • src/main/java/com/bcsdlab/bcsdinternalapiv2/activity/exception/ActivityException.java
  • src/main/java/com/bcsdlab/bcsdinternalapiv2/activity/exception/ActivityExceptionType.java
  • src/main/java/com/bcsdlab/bcsdinternalapiv2/curriculum/exception/CurriculumException.java
  • src/main/java/com/bcsdlab/bcsdinternalapiv2/curriculum/exception/CurriculumExceptionType.java
  • src/main/java/com/bcsdlab/bcsdinternalapiv2/global/SoftDeletableEntity.java
  • src/main/java/com/bcsdlab/bcsdinternalapiv2/global/config/S3Config.java
  • src/main/java/com/bcsdlab/bcsdinternalapiv2/global/config/S3Properties.java
  • src/main/java/com/bcsdlab/bcsdinternalapiv2/global/exception/GlobalException.java
  • src/main/java/com/bcsdlab/bcsdinternalapiv2/global/exception/GlobalExceptionType.java
  • src/main/java/com/bcsdlab/bcsdinternalapiv2/global/util/DisplayOrders.java
  • src/main/java/com/bcsdlab/bcsdinternalapiv2/media/exception/MediaException.java
  • src/main/java/com/bcsdlab/bcsdinternalapiv2/media/exception/MediaExceptionType.java
  • src/main/java/com/bcsdlab/bcsdinternalapiv2/track/exception/TrackException.java
  • src/main/java/com/bcsdlab/bcsdinternalapiv2/track/exception/TrackExceptionType.java
  • src/main/resources/application.yml
  • src/test/java/com/bcsdlab/bcsdinternalapiv2/IntegrationTestSupport.java
  • src/test/java/com/bcsdlab/bcsdinternalapiv2/controller/HealthCheckIntegrationTest.java
  • src/test/java/com/bcsdlab/bcsdinternalapiv2/global/exception/BcsdExceptionTypeContractTest.java
  • src/test/java/com/bcsdlab/bcsdinternalapiv2/global/util/DisplayOrdersTest.java

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant