This is a simple Bookstore web application built using Spring Boot. It allows users to view, add, update, and delete books in an online store.
The directory structure of this project is as follows:
- .idea/ # IDE specific files
- .mvn/ # Maven wrapper files
- src/ # Source code files
- main/
- java/ # Java source files
- resources/ # Resources (application.properties, static files, etc.)
- test/ # Test source files
- target/ # Compiled bytecode and JAR file
- .gitignore # Git ignore file
- mvnw # Maven wrapper for Linux/Unix systems
- mvnw.cmd # Maven wrapper for Windows systems
- pom.xml # Maven project configuration file
- Java 11 or later ☕
- Maven 3.6.3 or later ⚙️
- Spring Boot 2.x or later 🚀
-
Clone the repository:
git clone https://github.com/Bushra-Butt-17/BookStore.git cd bookstore-spring-boot
-
Build the project: Using Maven Wrapper (recommended):
./mvnw clean install # For Linux/Unix mvnw.cmd clean install # For Windows
Alternatively, you can use Maven directly if it’s installed:
mvn clean install
-
Run the application: Once the build is successful, you can run the application with:
./mvnw spring-boot:run # For Linux/Unix mvnw.cmd spring-boot:run # For Windows
The application will start on
http://localhost:8080
🌐.
GET /books
📚: Get the list of all booksPOST /books
➕: Add a new bookPUT /books/{id}
✏️: Update a book's detailsDELETE /books/{id}
❌: Delete a book from the store
The project uses default Spring Boot properties. You can customize the configuration by editing the src/main/resources/application.properties
file.
You can write unit and integration tests under the src/test/java
directory.
To run the tests, use the following command:
./mvnw test # For Linux/Unix
mvnw.cmd test # For Windows
This project is licensed under the MIT License - see the LICENSE file for details.