Skip to content
DevSimulatePublic

About

Spring Boot payments and ledger service

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

FinServe

The payments and ledger service for Northwind Bank (fictional). Spring Boot 3 + JPA.

Accounts hold balances; transfers move money between them. This service is the source of truth for customer balances, so atomicity and correctness under concurrency are non-negotiable — a lost update or a torn transfer is real money gone missing.

Architecture

controller/   REST endpoints (accounts, transfers)
service/      business logic — transfers, interest, statements
repository/   Spring Data JPA repositories
model/        JPA entities (Account, Transaction)
Area Files
Transfers service/TransferService.java
Accounts service/AccountService.java, controller/AccountController.java
Statements / batch service/StatementService.java
Entities model/Account.java, model/Transaction.java

Run

mvn spring-boot:run

H2 in-memory DB (console at /h2-console). The Hikari pool is deliberately small (5) so concurrency and pool-exhaustion issues surface under load.

Domain rules

  • Money is BigDecimal (scale 4) — never double. Floating point loses cents.
  • A transfer must be atomic: debit and credit succeed together or not at all.
  • Concurrent transfers on the same account must not lose updates.
  • Statements are exported nightly to disk by a batch job.

About

Spring Boot payments and ledger service

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages