Spring Boot based implementation of a minimalist book inventory app to represent a possible module architecture. This app offers basic CRUD functionality and some search functionality for handling books via book title and author. The book entities are persisted in an underlying SQL database (in memory) for the sake of simplicity. On the creation of a new Book it is registered via an imaginary 3rd party "register book" endpoint returning with an isbn number.
The book inventory app relies on my Rest Devtools library released now in Sonatype repo / Maven Central .
See more details: Blog post
POST http://localhost:8080/api/books payload: { "author":"Tamas Lang","title":"Spring app architecture","isbn":null } response: 201 Created with header: Location : http://localhost:8080/api/books/isbn1001
GET http://localhost:8080/api/books/isbn1001 response: { "author":"Tamas Lang","title":"Spring app architecture","isbn":null }
GET http://localhost:8080/api/books response: [{ "author":"William Shakespeare","title":"Hamlet","isbn":null }, { "author":"Paolo Giordani","title":"La solitudine dei numeri primi","isbn":null }]
PUT http://localhost:8080/api/books/isbn1001 payload: { "author":"Tamas Lang","title":"Spring app architecture","isbn":"isbn1001" } response: 200 OK
GET http://localhost:8080/api/books?author=William response: [{ "author":"William Shakespeare","title":"Hamlet","isbn":null }]
GET http://localhost:8080/api/books?title=Hamlet response: 200 OK [{ "author":"William Shakespeare","title":"Hamlet","isbn":null }]
DELETE http://localhost:8080/api/books/isbn1001 response: 200 OK