A simple library management system built using Java and Spring Boot. It allows users to manage books, providing APIs for creating, updating, retrieving, and deleting records.
- Manage books (create, update, retrieve, delete)
- Java: Version 17
- Spring Boot: Version 2.7.0
- H2 Database: Embedded database used for data storage
- Postman: API testing tool
LibraryManagement-Springboot
├───src
│ ├───main
│ │ ├───java
│ │ │ └───com
│ │ │ └───example
│ │ │ └───LibraryManagementApplication
│ │ │ ├───Control # Controllers for handling HTTP requests
│ │ │ ├───Model # Models representing the entities
│ │ │ ├───Repository # Repository interfaces for database operations
│ │ │ ├───Service # Service layer for business logic
│ └───resources
│ └───application.properties # Configuration for the H2 database
├───test
└───pom.xml # Maven configuration
Column | Data Type | Description |
---|---|---|
book_id |
VARCHAR(255) | Primary key, unique book ID |
name |
VARCHAR(255) | Book title |
author |
VARCHAR(255) | Author of the book |
- Base URL:
/api/v1/
GET /books/{bookId}
: Retrieve a book by its IDPOST /books
: Create a new bookPUT /books/{bookId}
: Update an existing bookDELETE /books/{bookId}
: Delete a book by its ID
- Java 17
- Maven
- Clone the repository:
git clone https://github.com/xreedev/LibraryManagement-Springboot.git cd LibraryManagement-Springboot
- Run the application:
mvn spring-boot:run