How to make Jersey work with Dagger dependency injection?

You shouldn’t think of it as “how to integrate dagger with jersey”. Figure out how to setup jersey, then once you have that figured out, then you can worry about using dagger. Here’s (very roughly) how I would do it. Create your own implementation of the ResourceConfig class. @ApplicationPath(“/service”) public class MyResourceConfig extends ResourceConfig { … Read more

Practical advice on using Jersey and Guice for RESTful service

Guice integration with Jersey has not stagnated. The opposite is true. Thanks to Paul and his cohorts behind Jersey, the latest 1.7 release contains a special JerseyServletModule class to work with Guice-based servlets. Guice-based constructor injection into JAX-RS resource works! The issue is using JAX-RS annotations such as @QueryParam in the constructor of a JAX-RS … Read more