Skip to content

Example application to have a prototype with Dropwizard, Guice (IoC) and Redis.

Notifications You must be signed in to change notification settings

willeeh/dropwizard-redis

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

dropwizard-redis

Example application to have a prototype with Dropwizard, Guice (IoC) and Redis.

Assumptions:

  • Have installed Redis on your machine.
  • Have launched redis-server on port 6379 (you can change the port but application.yml file should have the same one)

Easy as 1, 2, 3. Do the following:

git clone https://github.com/willeeh/dropwizard-redis.git
cd dropwizard-redis/
mvn package
java -jar target/dropwizard-redis-1.0-SNAPSHOT.jar server src/main/resources/local/application.yml

Go to a terminal and type:

curl -H "Accept: application/json" -H "Content-type: application/json" -X POST -d '{"message":"My first post!"}' http://localhost:8080/v1/post

Then you can see your post on redis launching redis-cli and type:

get posts:1
get counter:posts

This is it.

About

Example application to have a prototype with Dropwizard, Guice (IoC) and Redis.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages