..* To set up project, follow below step
- Import library_database.sql in mysql database.
- Change database configuration in "src/main/resources/db.properties" file.
..* Database Diagram
..* Resourse URL's to use this web service
-
add student : POST – http://localhost:8080/booklib/api/student { "firstName" : "Anuj", "lastName" : "Gupta", "phoneNubmer" : "1234567890", "email" : "[email protected]", "password" : "password" }
-
Student authentication : POST - http://localhost:8080/booklib/api/student/authenticate { "email" : "[email protected]", "password" : "password" }
-
Get all book publishers: GET - http://localhost:8080/booklib/api/bookPublisher
-
Add publisher : POST - http://localhost:8080/booklib/api/bookPublisher { "name": "Demo publisher" }
-
Update publisher: PUT - http://localhost:8080/booklib/api/bookPublisher/{publisherid} { "name": "Demo publisher updated1" }
-
Get all book categories: GET - http://localhost:8080/booklib/api/bookCategory
-
Add Category : POST - http://localhost:8080/booklib/api/bookCategory { "name": "biography" }
-
Update Category: PUT - http://localhost:8080/booklib/api/bookCategory/{categoryid} { "name": "updated category name" }
-
Get books by page: http://localhost:8080/booklib/api/book?page=1&limit=5&authorid=1 Here page, limit and author id are parameters.
-
Add book : POST - http://localhost:8080/booklib/api/book { "name": "Game of throns", "edision": "3", "numberOfBookAvailable": "10", "category": { "id" : "10" }, "author" : { "id" : "2" },
"publisher" : { "id" : "2" }
}
-
Issue a book to a student : - POST - http://localhost:8080/booklib/api/loan { "bookId" : 13, "studentId" : 3 }
-
Get the assigned book (loan detail) detail in a report : - http://localhost:8080/booklib/api/loan/report
-
Deposit a book for student : PUT - Issue a book to a student : - POST - http://localhost:8080/booklib/api/loan { "bookId" : 13, "studentId" : 3 }
-
Get book assigned to student : GET - http://localhost:8080/booklib/api/loan?studentId=2