This project implements a RESTful API for library management using Spring Boot and MySQL. The API provides endpoints for common book management operations like adding, updating, deleting, and fetching books.
- CRUD operations for books
- Search books by title, author, genre, etc.
- User management and auth using Spring Security
- Database schema modeling with JPA
- Exception handling and input validation
The API can be consumed by any frontend using the exposed endpoints. Some examples:
- Fetch all books: GET /api/books
- Get a book: GET /api/books/{id}
- Add a new book: POST /api/books
- Update a book: PUT /api/books/{id}
- Delete a book: DELETE /api/books/{id}
The API uses Maven for dependency management. To build and run the app:
- mvn clean install
- mvn spring-boot:run
This will start the API on port 8090. The API can then be accessed from http://localhost:8090
- The API uses a MySQL database. The schema is automatically created on startup using Hibernate.
- The connection properties are configured in application.properties.
Unit and integration tests are included that verify the API endpoints. Run them using:
- mvn test




