users@jersey.java.net

Re: [Jersey] GuiceComponentProviderFactory.isInjectPresent only looks at constructors

From: Paul Sandoz <Paul.Sandoz_at_Sun.COM>
Date: Fri, 15 May 2009 17:06:35 +0200

On May 15, 2009, at 4:58 PM, Zach Cox wrote:
>
>> I am guessing you are not explicitly binding your classes in a
>> module,
>> correct?
>
> Right - I'm not explicitly registering any of my root resource classes
> that need Guice injection, I'm just doing this in my
> configureServlets() override so Jersey will automatically find them
> all:
>
> serve("/*").with(GuiceContainer.class, params);
>
> Although it looks like if I had explicitly done
> bind(BlahResource.class) before serve("/*") then it would have had
> method injection performed without defining any constructor injection,
> is that correct?
>

Correct.

Paul.