A small Spring Boot loan management application that currently connects to a legacy data warehouse (simulated via H2 with legacy-style schemas). The workshop challenge is to migrate the data source to a modern schema while keeping the application functional.
This app manages loan data: borrowers, loan products, loan accounts, and payment history. It currently reads from legacy tables with denormalized structures, cryptic column names, and outdated patterns. The goal is to rewire it to use a normalized modern schema with clear naming conventions.
┌─────────────────────────────┐
│ Loan Service (Spring Boot)│
│ │
│ Controllers ─► Services │
│ │ │
│ Repositories │
│ │ │
│ Legacy DataSource │ ← YOU ARE HERE
│ (H2 / legacy schema)│
│ │
│ Modern DataSource │ ← MIGRATE TO HERE
│ (H2 / modern schema)│
└─────────────────────────────┘
The app connects to legacy tables:
CDW_BORR_MSTR— Borrower master (denormalized, cryptic columns)CDW_LN_PROD— Loan productsCDW_LN_ACCT— Loan accounts (wide table with embedded borrower data)CDW_PMT_HIST— Payment history
See data/legacy-schema/ for full DDL and data/mappings/ for column-level mappings.
Migrate to normalized tables:
borrowers— Clean borrower recordsloan_products— Product catalogloan_accounts— Normalized loan accounts with foreign keyspayments— Payment records
See data/modern-schema/ for target DDL.
./mvnw spring-boot:runThe app runs on http://localhost:8080 with endpoints:
GET /api/loans— List all loansGET /api/loans/{id}— Get loan detailsGET /api/borrowers— List borrowersGET /api/borrowers/{id}— Get borrower with loansGET /api/payments/loan/{loanId}— Payment history for a loan
- Java 17
- Spring Boot 3.2
- Spring Data JPA
- H2 (in-memory, simulating legacy DW)
- Maven
MIT