https://github.com/aburraq/librarymanagementsystem-springframework
Yesterday, realizing my GitHub lacked a Spring project, I swiftly crafted one. In just a day, this Spring MVC application took shape, showcasing my coding efficiency and commitment. Explore and enjoy the fruits of a day's dedicated work!
https://github.com/aburraq/librarymanagementsystem-springframework
crud-operations java library-management-system-java lombok-maven pagination postgressql restfull-api sorting spring-container spring-data-jpa springboot springmvc webdevelopement
Last synced: 3 months ago
JSON representation
Yesterday, realizing my GitHub lacked a Spring project, I swiftly crafted one. In just a day, this Spring MVC application took shape, showcasing my coding efficiency and commitment. Explore and enjoy the fruits of a day's dedicated work!
- Host: GitHub
- URL: https://github.com/aburraq/librarymanagementsystem-springframework
- Owner: Aburraq
- Created: 2024-01-14T11:44:36.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-01-14T11:52:45.000Z (over 1 year ago)
- Last Synced: 2025-01-17T21:43:55.171Z (4 months ago)
- Topics: crud-operations, java, library-management-system-java, lombok-maven, pagination, postgressql, restfull-api, sorting, spring-container, spring-data-jpa, springboot, springmvc, webdevelopement
- Language: Java
- Homepage:
- Size: 74.2 KB
- Stars: 0
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Library Management System
## About the Project
This project implements a Library Management System using Spring MVC. It includes controllers for managing teachers and books, providing various endpoints for CRUD operations and additional functionalities. All of the endpoints are tested with Postman and project is ready to use after DB configuration.
## Key Features
RESTful API Endpoints: Utilizing the @RestController annotation, our project exposes clean and RESTful endpoints for various operations, facilitating easy integration with other systems.
CRUD Operations: The project supports Create, Read, Update, and Delete (CRUD) operations for both teachers and books, ensuring comprehensive management of library resources.
Validation Support: We've incorporated the spring-boot-starter-validation dependency to enable robust validation of incoming requests, ensuring data integrity and security.
Pagination and Sorting: With the integration of Spring Data JPA, the application provides endpoints for paginated and sorted retrieval of data, enhancing user experience and system performance.
Database Interaction: The project interacts with a PostgreSQL database, offering a reliable and scalable storage solution for library-related data.
Dependency Management: Maven is used for project management and dependency resolution, simplifying the build and deployment processes.
### Teacher Controller
The `TeacherController` manages teacher-related operations:
- **Save Teacher**: `POST /teachers`
- **Get All Teachers**: `GET /teachers`
- **Find Teacher by ID (PathVariable)**: `GET /teachers/{id}`
- **Find Teacher by ID (RequestParam)**: `GET /teachers/query?id={id}`
- **Delete Teacher by ID**: `DELETE /teachers/{id}`
- **Update Teacher by ID**: `PUT /teachers/{teacherId}`
- **Get Teacher by DTO (RequestParam)**: `GET /teachers/query/dto?id={id}`
- **Get Teachers with Pagination**: `GET /teachers/page?page={page}&size={size}&sort={sort}&direction={direction}`
- **Add Teacher for a Book**: `POST /teachers/{bookId}/teachers`### Book Controller
The `BookController` manages book-related operations:
- **Save Book**: `POST /books`
- **Get All Books**: `GET /books`
- **Get Book by ID**: `GET /books/{id}`
- **Get Book by ID (RequestParam)**: `GET /books/query?id={id}`
- **Get Books by Title**: `GET /books/title?title={title}`
- **Delete Book by ID**: `DELETE /books/{id}`
- **Update Book by ID**: `PUT /books/{bookId}`
- **Get Book with DTO (RequestParam)**: `GET /books/query/dto?id={id}`
- **Add Book for a Teacher**: `POST /books/{teacherId}/books`
- **Get Books with Pagination**: `GET /books/page?p={page}&size={size}&sort={sort}&direction={direction}`## Usage
1. Clone the repository.
2. Configure your database settings in the `application.properties` file.
3. Run the application using your preferred method (e.g., IDE or `mvn spring-boot:run`).
4. Access the provided endpoints for managing teachers and books.
5. Feel free to extend this project based on your specific requirements. The modular structure of Spring MVC allows easy customization and addition of features.Feel free to extend and customize this system based on your specific requirements.
## Dependencies
This project is built using Maven and utilizes the following dependencies:
```xml
org.springframework.boot
spring-boot-starter-actuator
org.springframework.boot
spring-boot-starter-data-jpa
org.springframework.boot
spring-boot-starter-validation
org.springframework.boot
spring-boot-starter-web
org.springframework.boot
spring-boot-devtools
runtime
true
org.postgresql
postgresql
runtime
org.projectlombok
lombok
true
org.springframework.boot
spring-boot-starter-test
test