- register a new borrower to the library
- register a new book to the library
- get a list of all books in the library
- borrow a book with a particular book id
- return a borrowed book
JDK 17 is required to compile and run the application.
Docker and Docker Compose to start PostgreSQL and integration test
clone this repository into your local using Git
docker compose up
./mvnw spring-boot:run
./mvnw verify
You can browse all exposed API via http://localhost:8080/swagger-ui/index.html Please refer to Booklists.txt for sample books with valid ISBN for testing
- Borrower's email must be unique.
- Borrower's email is not encrypted.
- Multiple books with same ISBN but different title or author consider as error.
- This library does not limit the duration of book borrowing period.
- This library will return all books without pagination. Might caused performance issue when number of books exceed certain size..