Welcome to the Library Spring API! This API provides endpoints to manage a collection of books within a library. With this API, you can seamlessly Add, List, and Remove books from your library inventory.
-
Java: Primary backend programming language.
-
Maven: Build automation and project management tool.
-
Spring Boot: Framework for creating production-grade Spring-based applications.
-
MySQL: Open-source relational database management system.
-
Postman: Platform for API design, testing, and documentation.
-
Create: Add new books to your inventory by providing essential details such as title, author, genre, publication year and image.
-
Read: Access detailed information about each book in your collection.
-
Delete: Remove outdated or redundant entries from your inventory with ease.
To start using the Library Spring API, follow these simple steps:
- Install Necessary Tools: Ensure you have the following tools installed:
- Java Development Kit (JDK)
- Maven
- Postman (for API testing)
- Clone the Repository Clone the repository containing the Library Spring API code to your local machine:
git clone https://github.com/tuchanski/library-spring-api.git
- Configure Application Properties
- Open the application.properties file and configure the database connection properties according to your MySQL database setup.
- Build and Run the Application
-
Navigate to the Project Directory: Open your terminal or command prompt and navigate to the directory where the
LibraryApplication.java
file is located. -
Run the following Maven command:
mvn clean install
- Once the build is successful, execute the following command to run the application:
mvn spring-boot:run
- Test API Endpoints
-
Open Postman and import the provided collection of API requests.
-
Set the request headers to include your API key for authentication.
-
Use the imported requests to interact with the API endpoints for adding, listing, and removing books from the library.
Enjoy using the Library Spring API! 📚
Contributions are welcome! If you have any suggestions, feature requests, or bug reports, please open an issue or submit a pull request.