An open API service indexing awesome lists of open source software.

https://github.com/bushra-butt-17/bookstore

A Spring Boot application for managing a bookstore, allowing users to view, add, update, and delete books. Built using Maven, this project includes essential RESTful APIs for efficient book management.
https://github.com/bushra-butt-17/bookstore

html-css-javascript java java-maven-ecs spring-boot website-development

Last synced: 8 months ago
JSON representation

A Spring Boot application for managing a bookstore, allowing users to view, add, update, and delete books. Built using Maven, this project includes essential RESTful APIs for efficient book management.

Awesome Lists containing this project

README

          

---

# πŸ“š Bookstore Spring Boot Application

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.

## πŸ—‚οΈ Project Structure

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
```

## πŸ“ Requirements

- **Java 11 or later** β˜•
- **Maven 3.6.3 or later** βš™οΈ
- **Spring Boot 2.x or later** πŸš€

## πŸ”§ Installation

1. **Clone the repository**:
```bash
git clone https://github.com/Bushra-Butt-17/BookStore.git
cd bookstore-spring-boot
```

2. **Build the project**:
Using **Maven Wrapper** (recommended):
```bash
./mvnw clean install # For Linux/Unix
mvnw.cmd clean install # For Windows
```

Alternatively, you can use **Maven** directly if it’s installed:
```bash
mvn clean install
```

3. **Run the application**:
Once the build is successful, you can run the application with:
```bash
./mvnw spring-boot:run # For Linux/Unix
mvnw.cmd spring-boot:run # For Windows
```

The application will start on `http://localhost:8080` 🌐.

## πŸ”‘ Endpoints

- `GET /books` πŸ“š: Get the list of all books
- `POST /books` βž•: Add a new book
- `PUT /books/{id}` ✏️: Update a book's details
- `DELETE /books/{id}` ❌: Delete a book from the store

## βš™οΈ Configuration

The project uses **default Spring Boot properties**. You can customize the configuration by editing the `src/main/resources/application.properties` file.

## πŸ§ͺ Testing

You can write **unit** and **integration tests** under the `src/test/java` directory.

To run the tests, use the following command:

```bash
./mvnw test # For Linux/Unix
mvnw.cmd test # For Windows
```

## πŸ“„ License

This project is licensed under the **MIT License** - see the [LICENSE](LICENSE) file for details.

---