Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mashateayoub/springbootperformanceopt
Simple SpringBoot API showing performance optimization (Async, caching & compression)
https://github.com/mashateayoub/springbootperformanceopt
async compression java redis redis-cache spring-boot
Last synced: 30 days ago
JSON representation
Simple SpringBoot API showing performance optimization (Async, caching & compression)
- Host: GitHub
- URL: https://github.com/mashateayoub/springbootperformanceopt
- Owner: mashateayoub
- Created: 2024-12-03T13:41:16.000Z (about 1 month ago)
- Default Branch: main
- Last Pushed: 2024-12-03T13:43:58.000Z (about 1 month ago)
- Last Synced: 2024-12-17T16:15:53.389Z (30 days ago)
- Topics: async, compression, java, redis, redis-cache, spring-boot
- Language: Java
- Homepage:
- Size: 11.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: Readme.md
Awesome Lists containing this project
README
# Performance API
## Overview
This project is a Spring Boot application designed for performance optimization. It provides endpoints to manage and retrieve book information, utilizing caching and asynchronous processing to enhance performance.
## Features
- **CRUD Operations**: Create, Read, Update, and Delete operations for books.
- **Caching**: Utilizes Redis for caching book data to improve response times.
- **Asynchronous Processing**: Supports asynchronous retrieval of book data.
- **PostgreSQL Database**: Uses PostgreSQL as the data store.## Technologies Used
- Java 17
- Spring Boot 3.3.4
- Spring Data JPA
- Redis
- PostgreSQL
- Lombok
- Maven## Getting Started
### Prerequisites
- Java 17
- Maven
- PostgreSQL
- Redis### Installation
1. Clone the repository:
```bash
git clone https://github.com/mashateayoub/performance.git
cd performance
```2. Configure the database:
- Create a PostgreSQL database named `API_PERFORMANCE`.
- Update the `application.yml` file with your PostgreSQL credentials.3. Start a Redis server.
4. Build the project:
```bash
mvn clean install
```5. Run the application:
```bash
mvn spring-boot:run
```### API Endpoints
- **Get All Books**: `GET /api/books`
- **Get Book by ID**: `GET /api/books/{id}`
- **Get All Books Asynchronously**: `GET /api/books/async`## Configuration
The application configuration can be found in `src/main/resources/application.yml`. You can modify the Redis and PostgreSQL settings as needed.
## Running Tests
To run the tests, use the following command:
```bash
mvn test
```