Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 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;
- }
- }
Add Comment
Please, Sign In to add comment