Compare commits

..

4 commits

4 changed files with 66 additions and 0 deletions

View file

@ -0,0 +1,3 @@
# SPRING-ARC-SCHEMA-1783830385-attempt-2
Forge 이슈 작업 브랜치 `forge/SPRING-ARC-SCHEMA-1783830385-attempt-2`.

View file

@ -0,0 +1,14 @@
# 결제 전환 목표 아키텍처 결정 기록
## Context
결제 시스템의 경계를 정의하고, 결제 전환 목표를 달성하기 위한 아키텍처를 설계한다.
## Decision
결제 전환 과정에서의 주요 경계는 서비스, 도메인, 통합 계층으로 나뉘며, 각 계층의 책임을 명확히 한다.
## Alternatives
1. 모든 로직을 단일 서비스에서 처리
2. 마이크로서비스 아키텍처로 분리
## Consequences
선택한 아키텍처는 결제 시스템의 확장성과 유지보수성을 높인다.

View file

@ -0,0 +1,7 @@
| 패키지 | 책임 | 금지 의존성 |
|--------------|----------------------------------|-------------------|
| controller | 사용자 요청 처리 | service, repository |
| service | 비즈니스 로직 처리 | controller |
| repository | 데이터 접근 및 저장 | service |
| domain | 도메인 모델 정의 | integration |
| integration | 외부 시스템과의 통신 | domain |

View file

@ -0,0 +1,42 @@
```mermaid
sequenceDiagram
participant User
participant Controller
participant Service
participant Repository
participant DB
User->>Controller: 결제 요청
Controller->>Service: 결제 처리 요청
Service->>Repository: 결제 정보 저장
Repository->>DB: DB에 결제 정보 저장
DB-->>Repository: 저장 성공
Repository-->>Service: 저장 성공
Service-->>Controller: 처리 성공
Controller-->>User: 결제 완료
Note over User, Controller: 외부 실패 처리
User->>Controller: 결제 요청
Controller->>Service: 결제 처리 요청
Service->>Repository: 결제 정보 저장
Repository->>DB: DB에 결제 정보 저장
DB-->>Repository: 저장 실패
Repository-->>Service: 저장 실패
Service-->>Controller: 처리 실패
Controller-->>User: 결제 실패
Note over User, Controller: DB 실패 처리
User->>Controller: 결제 요청
Controller->>Service: 결제 처리 요청
Service->>Repository: 결제 정보 저장
Repository->>DB: DB에 결제 정보 저장
DB-->>Repository: DB 연결 실패
Repository-->>Service: DB 연결 실패
Service-->>Controller: 처리 실패
Controller-->>User: 결제 실패
Note over Service: Commit 경계
Service->>Repository: Commit
Note over Service: Rollback 경계
Service->>Repository: Rollback
```