Spring Boot Mysql Redis REST API Cache example
- JDK 1.8
- Maven
- Mysql
- Redis
git clone https://github.com/jeonguk/spring-mysql-redis-cache.git
cd spring-mysql-redis-cache
MySQL START
Redis START
mvn clean package
java -jar target/spring-mysql-redis-cache.jar
http://localhost:8091/env
http://localhost:8091/health
http://localhost:8091/info
http://localhost:8091/metrics
- data add
curl -d '{"title":"post title", "content":"post content"}' -H "Content-Type: application/json" -X POST http://localhost:8080/api/posts
- data get cache TimeUnit.SECONDS 10
curl http://localhost:8080/api/posts/1
- http://localhost:8080/swagger-ui.html
- Response Content Type : application/json