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

https://github.com/henriiqueaze/library-api

This project is an API (Application Programming Interface) that allows the management and organization of book data, providing basic CRUD.
https://github.com/henriiqueaze/library-api

java springboot sql

Last synced: 3 months ago
JSON representation

This project is an API (Application Programming Interface) that allows the management and organization of book data, providing basic CRUD.

Awesome Lists containing this project

README

          

#

📚 Library API


StudentProgress Logo

## 📖 Description
API to manage and organize book data, including adding, updating, retrieving, and deleting books.

## ⚙️ How to use
1. **Clone this repository and access the folder:**
```bash
git clone git@github.com:henriiqueaze/Library-API.git
cd Library-API
```

2. **Set up environment variables:**
Create a `.env` file and define your database credentials:
```bash
DB_USERNAME=root
DB_PASSWORD=yourpassword
```

3. **Build the project:**
```bash
mvn clean install
```

4. **Run the project:**
```bash
mvn spring-boot:run
```

5. **Access the project:**
The project will be available at:
```bash
http://localhost:8080/book
```

6. **Swagger Documentation:**
The API documentation is available via Swagger at:
```bash
http://localhost:8080/swagger-ui.html
```

## 📌 Endpoints
- **GET /book/{id}** - Retrieve a book by ID.
- **GET /book** - List all books.
- **POST /book** - Add a new book.
- **PUT /book** - Update a book by ID.
- **DELETE /book/{id}** - Delete a book by ID.

## 🛠 Stack
- Java
- Spring Boot
- Hibernate
- Flyway
- MySQL
- HATEOAS
- Swagger (for API documentation)