{"id":23338312,"url":"https://github.com/abhirockzz/redis-cdi-example","last_synced_at":"2025-04-09T22:32:18.583Z","repository":{"id":79125316,"uuid":"88291867","full_name":"abhirockzz/redis-cdi-example","owner":"abhirockzz","description":"Example for a Java EE CDI producer for Jedis (Redis Java client)","archived":false,"fork":false,"pushed_at":"2017-05-12T15:50:26.000Z","size":12,"stargazers_count":6,"open_issues_count":0,"forks_count":3,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-24T00:24:47.455Z","etag":null,"topics":["cdi","dependency-injection","docker","docker-compose","javaee7","jedis","redis"],"latest_commit_sha":null,"homepage":"https://abhirockzz.wordpress.com/2017/04/14/redis-cdi-example","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/abhirockzz.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-04-14T18:17:16.000Z","updated_at":"2023-01-26T00:21:21.000Z","dependencies_parsed_at":"2023-03-12T06:44:00.640Z","dependency_job_id":null,"html_url":"https://github.com/abhirockzz/redis-cdi-example","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abhirockzz%2Fredis-cdi-example","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abhirockzz%2Fredis-cdi-example/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abhirockzz%2Fredis-cdi-example/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abhirockzz%2Fredis-cdi-example/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/abhirockzz","download_url":"https://codeload.github.com/abhirockzz/redis-cdi-example/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248123498,"owners_count":21051480,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cdi","dependency-injection","docker","docker-compose","javaee7","jedis","redis"],"created_at":"2024-12-21T03:13:33.231Z","updated_at":"2025-04-09T22:32:18.575Z","avatar_url":"https://github.com/abhirockzz.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Start with Docker Compose\r\n\r\n- `git clone https://github.com/abhirockzz/redis-cdi-example.git`\r\n- `mvn clean install` - creates `redis-cdi.war` in `target` dir\r\n- `docker-compose up --build` - starts Redis and TomEE containers (you can switch to any other [Java EE runtime](https://github.com/abhirockzz/redis-cdi-example/blob/master/Dockerfile#L1))\r\n\r\n## Test\r\n\r\n- `docker-machine ip` - get the IP address of your Docker host. Let's call it `APP_HOST`\r\n- `curl -X POST http://\u003cAPP_HOST\u003e:8080/redis-cdi/kv/hello -d world` - this uses the [injected `Jedis` from the pool](https://github.com/abhirockzz/redis-cdi-example/blob/master/src/main/java/com/wordpress/abhirockzz/redis/cdi/PooledJedisProducer.java) to insert a key-value pair in Redis\r\n- `curl -X GET http://\u003cAPP_HOST\u003e:8080/redis-cdi/kv/hello` - this uses the [simple `Jedis` connection](https://github.com/abhirockzz/redis-cdi-example/blob/master/src/main/java/com/wordpress/abhirockzz/redis/cdi/JedisProducer.java) to fetch the value from Redis. You should get `world` in response (`HTTP 200`)\r\n- `docker-compose down -v` once you're done....\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabhirockzz%2Fredis-cdi-example","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fabhirockzz%2Fredis-cdi-example","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabhirockzz%2Fredis-cdi-example/lists"}