Created
December 1, 2010 22:15
-
-
Save rdammkoehler/724331 to your computer and use it in GitHub Desktop.
A Bogus Servlet using Jersey and Guice
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package jerseyandguice; | |
import javax.servlet.http.HttpServlet; | |
import javax.ws.rs.Path; | |
import com.google.inject.Inject; | |
import com.google.inject.Singleton; | |
@Path("/jg") | |
@Singleton | |
public class BogoServlet extends HttpServlet { | |
private static final long serialVersionUID = 1L; | |
private Dependancy dependancy; | |
@Inject | |
public BogoServlet(Dependancy dep) { | |
dependancy = dep; | |
} | |
public Dependancy getDependancy() { | |
return dependancy; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment