spring-architecture-resilie.../docs/architecture/transaction-sequence.md
forge-bot 79be1fe507
All checks were successful
ci / test (pull_request) Successful in 6s
결제 전환 목표 아키텍처 정의 (SPRING-ARC-RESILIENT-1783826170)
2026-07-12 03:17:24 +00:00

37 lines
No EOL
1.2 KiB
Markdown

sequenceDiagram
participant User
participant Controller
participant Service
participant Repository
participant Database
participant ExternalGateway
User->>Controller: 결제 요청
Controller->>Service: 결제 처리 요청
Service->>Repository: 결제 정보 저장 요청
Repository->>Database: 결제 정보 저장
Database-->>Repository: 저장 성공
Repository-->>Service: 저장 성공
Service->>ExternalGateway: 외부 결제 처리 요청
ExternalGateway-->>Service: 성공 응답
Service-->>Controller: 결제 성공 응답
Controller-->>User: 결제 완료 응답
%% DB 실패 흐름
alt DB 실패
Repository-->>Service: 저장 실패 응답
Service-->>Controller: 오류 반환
Controller-->>User: 결제 실패 응답
end
%% 외부 실패 흐름
alt 외부 서비스 실패
Service->>ExternalGateway: 외부 결제 처리 요청
ExternalGateway-->>Service: 실패 응답
Service-->>Controller: 오류 반환
Controller-->>User: 결제 실패 응답
end
%% Commit/Rollback 경계
note over Repository: 만약 저장이 성공하면 commit
note over Repository: 만약 저장이 실패하면 rollback