You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
mvn clean install - creates redis-cdi.war in target dir
docker-compose up --build - starts Redis and TomEE containers (you can switch to any other Java EE runtime)
Test
docker-machine ip - get the IP address of your Docker host. Let's call it APP_HOST
curl -X POST http://<APP_HOST>:8080/redis-cdi/kv/hello -d world - this uses the injected Jedis from the pool to insert a key-value pair in Redis
curl -X GET http://<APP_HOST>:8080/redis-cdi/kv/hello - this uses the simple Jedis connection to fetch the value from Redis. You should get world in response (HTTP 200)
docker-compose down -v once you're done....
About
Example for a Java EE CDI producer for Jedis (Redis Java client)