These examples show how to use Spring Data Redis (using either Spring or Spring Boot).
Assumes Redis or Valkey are already running on port 6379.
Deploy one example at a time as they both use the same port, press CTRL+C to stop.
Spring Demo:
cd spring-demo
mvn clean jetty:runSpring Boot Demo:
cd spring-boot-demo
mvn clean spring-boot:runComplex Demo (Console App):
cd complex-demo
mvn clean compile exec:javaCall application endpoints:
curl -X POST "http://localhost:8080/api/data/set?key=mykey&value=hello_redis"
curl "http://localhost:8080/api/data/get?key=mykey"
curl -X DELETE "http://localhost:8080/api/data/delete?key=mykey"