A comprehensive library book management system built with Spring Boot, featuring full CRUD operations and an H2 in-memory database.
The Library Book Management System is a Spring Boot application designed to manage library book data. It allows users to create, read, update, and delete book records through a REST API. The application uses H2 as an in-memory database and provides endpoints for managing book information.
Ensure you have the following installed on your local development machine:
Clone the repository:
git clone https://github.com/Scavenger233/Library-Book-Management-Project.git
cd REST-API-Project
Build the project using Maven:
mvn clean install
You can run the application using one of the following methods:
Using Maven:
mvn spring-boot:run
Using an IDE (e.g., IntelliJ IDEA):
SprintBootCrudApplication.java
file as a Spring Boot Application.GET /api/library/{bookName}/books
GET /api/library/{bookName}/books/{id}
Endpoint: POST /api/library/{bookName}/books
Request Body:
{
"description": "A detailed description of the book"
}
Description: Creates a new book with the provided description.
Endpoint: PUT /api/library/{bookName}/books/{id}
Request Body:
{
"description": "Updated description of the book"
}
Description: Updates the description of the specified book.
DELETE /api/library/{bookName}/books/{id}
The application uses an H2 in-memory database. Configuration settings are located in the application.properties
file.
jdbc:h2:mem:testdb
sa
You can access the H2 database console at the following URL:
http://localhost:8080/h2-ui
To log in:
jdbc:h2:mem:testdb
sa
src
├── main
│ ├── java
│ │ └── com
│ │ └── library
│ │ ├── controller
│ │ ├── model
│ │ ├── repository
│ │ └── service
│ └── resources
│ ├── application.properties
│ └── static
└── test
Book
entity.This project is licensed under the MIT License. See the LICENSE file for details.