Skip to content

[Step2] 김태윤(Greem.17) 과제 제출합니다. - #75

Open
TaeYoon17 wants to merge 12 commits into
next-step:taeyoon17from
TaeYoon17:step2
Open

[Step2] 김태윤(Greem.17) 과제 제출합니다.#75
TaeYoon17 wants to merge 12 commits into
next-step:taeyoon17from
TaeYoon17:step2

Conversation

@TaeYoon17

@TaeYoon17 TaeYoon17 commented Mar 5, 2026

Copy link
Copy Markdown

작업 내용 요약

  • 서비스 레이어 트랜잭션 경계 정리
  • 예외를 조용히 삼키던 패턴에 warn 로깅 추가 (OrderEventListener, AuthenticationResolver) ->
  • 누락된 기능 구현: 옵션 수정 API, 상품 카테고리 필터, 위시리스트 생성일 정렬
  • Testcontainers MySQL 기반 통합 테스트 인프라 구축 및 도메인별 통합 테스트 추가
  • ADR 문서 7건 작성 (인증, 카카오 로그인, DB, 패키지 구조, 빌드 도구, 트랜잭션, 통합 테스트)

greemi17 and others added 12 commits March 5, 2026 12:23
- ADR 관리용 Claude 스킬 생성 (.claude/skills/adr/SKILL.md)
- 5개 초기 ADR 문서 작성 (인증, 카카오 로그인, DB 전략, 패키지 구조, 빌드 도구)
- KakaoAuthService: private 메서드 @transactional 버그 수정, DB 쓰기를 MemberService로 위임
- OrderService: 외부 API 호출을 @TransactionalEventListener로 분리
- 전 서비스 Spring @transactional + readOnly 패턴 통일

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
기존 회원 토큰 업데이트 / 신규 회원 생성 경로가 검증 없이 사용되던 문제 해결.
에러 처리 정책 분석 히스토리 및 통합 테스트 계획 문서 포함.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
OrderEventListener, AuthenticationResolver에서 예외를 조용히 삼키던 패턴에
warn 로깅을 추가하여 실패 원인을 추적할 수 있도록 개선.
예외 삼킴 정책 자체는 유지 (주문 흐름/인증 흐름에 영향 없음).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- H2 → Testcontainers MySQL로 테스트 DB 전환 (Flyway 마이그레이션 검증)
- @IntegrationTEST / @IntegrationTestWithoutTx 커스텀 어노테이션 추가
- IntegrationTestFixtures DB 저장 픽스처 헬퍼 추가
- ADR 007 통합 테스트 인프라 전략 문서 작성

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…rder

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…rder

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

@vsh123 vsh123 left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

안녕하세요! :)

step2도 구현잘해주셨네요

몇가지 코멘트 남겼으니 확인부탁드립니다.

마지막까지 화이팅입니다!! 👍

### KakaoAuthService 수정

- DB 쓰기 로직(`findOrCreate` + 카카오 토큰 업데이트)을 `MemberService.findOrCreateByEmailAndUpdateKakaoToken()`으로 위임하여 self-invocation 문제를 해결한다.
- KakaoAuthService 자체는 `readOnly = true`로 설정하고, 외부 API 호출 후 MemberService에 위임한다.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

이렇게 했을 경우에 트랜잭션이 어떻게 열려서 동작하는가요??

Transacational의 기본 propagation은 REQUIRED인데,

지금 KakaoAuthService에서 readOnly트랜잭션이 열리고, 그 안에서 MemberService.findOrCreateByEmailAndUpdateKakaoToken라는 write 트랜잭션이 열렸을까요??

final String email = jwtProvider.getEmail(token);
return memberRepository.findByEmail(email).orElse(null);
} catch (Exception e) {
log.warn("인증 토큰 처리 실패: {}", e.getMessage());

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

스택트레이스도 함께 남겨보면 어떨까요?

this.quantity = quantity;
}

public void update(String name, int quantity) {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

이번 커밋에 대해서는 근거 문서가 없는 것 같아요! 어떤 작업을 진행했는지 함께 체크해주면 어떨까요?

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.

3 participants