users@jersey.java.net

[Jersey] Using _at_Inject in Jersey

From: Robert DiFalco <robert.difalco_at_gmail.com>
Date: Fri, 7 Mar 2014 14:45:36 -0800

How do I make a service available for injection with Jersey 2.6?

I simply want to have something like:

    @Inject
    private MyService service;

In a resource. I assumed in my configuration I could just do this:

   register( MyService.class );

But apparently that doesn't work. What's the simplest way to make
MyResource @Inject-able with MyService in 2.6?

TIA!

R.