This project aims to develop a robust Library Management System API using Spring Boot. The system facilitates librarians in efficiently managing books, patrons, and borrowing records.
- Manage books, patrons, and borrowing records
- RESTful API endpoints
- CRUD operations
- Validation and error handling
- Unit tests
- Java
- Spring Boot
- Spring Data JPA
- MySQL
- Log4j2
Ensure you have the following installed:
- Java Development Kit (JDK) 17
- Maven
- MySQL
- Clone the Repository: https://github.com/OmarHariry/Library-Management-System-SpringBoot
- Configure the Database: CREATE DATABASE library_db;
- Build the Project: mvn clean install
- Run the Application: mvn spring-boot:run
You can use tools like curl, Postman, or any other API client to interact with the endpoints.
GET /api/books
Response:
GET /api/books/{id} Response:
POST /api/books/add
Request Body:
Response:
PUT /api/books/edit/{id}
Request Body:
Response:
DELETE /api/books/delete/{id}
Response:
GET /api/patrons
Response:
GET /api/patron/{id} Response:
POST /api/patron/add
Request Body:
Response:
PUT /api/patron/edit/{id} Request Body:
Response:
DELETE /api/patron/delete/{id}
Response:
POST api/borrow/{bookId}/patron/{patronId}
Response:
PUT api/return/{bookId}/patron/{patronId}
Response: