- 서비스별 의존성 수는
@Service클래스 내부에서 생성자 주입 대상으로 사용되는private final필드 개수로 집계 했습니다. @Value로 주입받는 설정값,static final상수, 초기값이 있는 필드는 직접 의존성에서 제외했다.- 프로젝트 직접 의존 수는 [
build.gradle]에 선언된 dependency 항목 개수로 집계했다.
build.gradle에 선언된 직접 의존성은 총19개- 구성별 개수
implementation: 11개runtimeOnly: 3개compileOnly: 1개annotationProcessor: 1개developmentOnly: 1개testImplementation: 2개
- 운영 관점에서 자주 언급하는 범위만 보면
implementation + runtimeOnly = 14개다.
| 서비스 | 직접 의존성 수 | 직접 의존 대상 |
|---|---|---|
| AccountService | 6 | UserRepository, StudentRepository, LogService, PasswordEncoder, InvestmentRepository, OneTimeTokenService |
| AuthService | 7 | AccountService, UserRepository, PasswordEncoder, StudentRepository, PendingUserRepository, OneTimeTokenService, OneTimeTokenRepository |
| MailService | 2 | JavaMailSender, AuthService |
| OneTimeTokenService | 1 | OneTimeTokenRepository |
| VerifyService | 3 | RestTemplate, ObjectMapper, PendingVerificationRepository |
| InquiryService | 1 | InquiryRepository |
| InventoryService | 2 | InventoryRepository, SnapshotsRepository |
| InvestmentService | 3 | InvestmentRepository, UserRepository, PendingUserRepository |
| ItemService | 1 | ItemRepository |
| KioskService | 1 | KioskReceiptRepository |
| NoticeService | 1 | NoticeRepository |
| PgService | 7 | WebClient, ChargeLogRepository, UserRepository, SelfChargeStandbyRepository, WebhookVerifier, ApplicationEventPublisher, JwtUtil |
| ReceiptService | 2 | ReceiptRepository, ItemService |
| TossService | 3 | ObjectMapper, RestTemplateBuilder, ItemRepository |
| LogService | 3 | ChargeLogRepository, PayLogRepository, UserRepository |
| TransactionService | 4 | AccountService, LogService, ItemService, ItemScansRepository |
| UserDetailsService | 1 | UserRepository |
| EncryptionService | 0 | 없음 |
| UserDataMigrationService | 2 | UserRepository, EncryptionService |
@Service로 선언된 서비스 클래스는 총19개- 서비스 계층 전체의 직접 주입 의존성 합은
50개 - 서비스당 평균 직접 의존성 수는 약
2.63개 - 직접 의존성이 가장 많은 서비스는
AuthService,PgService이며 각각7개를 가진다.
- 참조 수는
src/main/java기준으로 다른 Java 파일에서 클래스명 또는 도메인 패키지명이 등장한 횟수로 집계했다. - 서비스는 "몇 개의 파일이 이 서비스를 참조하는가"를 기준으로 봤다.
- 도메인은
bssm.devcoop.occount.domain.{도메인명}패키지 import 및 사용 흔적을 기준으로 봤다.
| 도메인 | 참조 파일 수 | 전체 언급 수 | 대표 사용 위치 |
|---|---|---|---|
| account | 20 | 39 | AccountController, AuthController, VerifyController, TransactionService |
| pg | 13 | 23 | PgController, PgService, WebhookVerifier |
| investment | 9 | 20 | InvestmentController, AccountController, Investment DTO |
| transaction | 7 | 17 | TransactionController, AccountService, LogService |
| toss | 7 | 13 | TossController, TossScheduler, Toss DTO |
| item | 7 | 9 | ItemController, InventoryController, ItemService |
| inventory | 4 | 8 | InventoryController, InventoryService |
| receipt | 5 | 8 | ReceiptController, InventoryController, ReceiptService |
| inquiry | 3 | 5 | InquiryController, InquiryService |
| kiosk | 3 | 3 | KioskController, ReceiptController, KioskService |
| notice | 2 | 3 | NoticeController, NoticeService |
| portone | 3 | 3 | VerifyService, PendingVerificationRepository |