Add library-management module: console app evolved into a Spring Boot 4 REST API
Stage 2 console classes and the shared LoanPolicy, then a Spring Boot 4.1.2 + JPA API (H2, @Version optimistic locking, problem+json errors). Tests write output/ transcripts while asserting the same numbers; scripts regenerate everything. Co-Authored-By: Claude Sonnet 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_017ic4b4DPL6dtpFg4U4LHc2
This commit is contained in:
@@ -0,0 +1,33 @@
|
||||
> add-book 978-0134685991|Effective Java|Joshua Bloch|2
|
||||
Added book: Effective Java (2 copies)
|
||||
> add-book 978-0596009205|Head First Java|Kathy Sierra|1
|
||||
Added book: Head First Java (1 copy)
|
||||
> add-book 978-0134685991|Effective Java|Joshua Bloch|2
|
||||
ERROR: ISBN 978-0134685991 already exists
|
||||
> add-member Asha
|
||||
Added member #1: Asha
|
||||
> add-member Ravi
|
||||
Added member #2: Ravi
|
||||
> borrow 978-0596009205 1 2026-11-01
|
||||
Loan #1: Asha borrowed 'Head First Java', due 2026-11-15
|
||||
> borrow 978-0596009205 2 2026-11-01
|
||||
ERROR: no copies of 'Head First Java' are available
|
||||
> borrow 978-0134685991 1 2026-11-01
|
||||
Loan #2: Asha borrowed 'Effective Java', due 2026-11-15
|
||||
> report
|
||||
Effective Java by Joshua Bloch: 1 available
|
||||
Head First Java by Kathy Sierra: 0 available
|
||||
ON LOAN #1: 'Head First Java' -> Asha, due 2026-11-15
|
||||
ON LOAN #2: 'Effective Java' -> Asha, due 2026-11-15
|
||||
> return 1 2026-11-20
|
||||
Loan #1 returned on 2026-11-20, fine Rs 10
|
||||
> return 1 2026-11-21
|
||||
ERROR: loan #1 was already returned on 2026-11-20
|
||||
> borrow 978-0596009205 2 2026-11-21
|
||||
Loan #3: Ravi borrowed 'Head First Java', due 2026-12-05
|
||||
> report
|
||||
Effective Java by Joshua Bloch: 1 available
|
||||
Head First Java by Kathy Sierra: 0 available
|
||||
ON LOAN #2: 'Effective Java' -> Asha, due 2026-11-15
|
||||
ON LOAN #3: 'Head First Java' -> Ravi, due 2026-12-05
|
||||
> quit
|
||||
Reference in New Issue
Block a user