git clone https://github.com/abhirockzz/redis-cdi-example.gitmvn clean install- createsredis-cdi.warintargetdirdocker-compose up --build- starts Redis and TomEE containers (you can switch to any other Java EE runtime)
docker-machine ip- get the IP address of your Docker host. Let's call itAPP_HOSTcurl -X POST http://<APP_HOST>:8080/redis-cdi/kv/hello -d world- this uses the injectedJedisfrom the pool to insert a key-value pair in Rediscurl -X GET http://<APP_HOST>:8080/redis-cdi/kv/hello- this uses the simpleJedisconnection to fetch the value from Redis. You should getworldin response (HTTP 200)docker-compose down -vonce you're done....