/Demo-SpringBoot-RedisCache

This project demo redis cache how to work in Spring Boot.

Primary LanguageJava

The Demo of implement cache in Spring Boot by Redis

Overview

This project demo redis cache how to work in Spring Boot.

Run Applications

  1. Startup the Database, Redis
docker-compose up -d ./docker/docker-compose.yml
  1. Start main program

How to test

  • Send one product:
curl --location --request POST 'http://localhost:8080/products' --header 'Content-Type: application/json' --data-raw '{
  "number": 100,
  "name": "product1"
}'
  • Search by id:
curl --location --request GET 'http://localhost:8080/products/1'