Spring Data for Redis example
- Local OR Docker install (select only one)
docker run -d --name redis -p 6379:6379 redis:4.0.1
curl -X POST \
http://localhost:8080/persons \
-H 'Content-Type: application/json' \
-d '{
"email": "cemserit@gmail.com",
"name": "Cem Serit",
"age": 27
}'
curl -X PUT \
http://localhost:8080/persons/cemserit@gmail.com \
-H 'Content-Type: application/json' \
-d '{
"email": "cemserit@gmail.com",
"name": "Cem Serit",
"age": 28
}'
curl -X GET \
http://localhost:8080/persons
curl -X GET \
http://localhost:8080/persons/emails
curl -X GET \
http://localhost:8080/persons/emails?age=28
curl -X DELETE \
http://localhost:8080/persons/cemserit@gmail.com