users@jersey.java.net

[Jersey] Re: Jersey 2.2 Spring Integration issues

From: Marko Asplund <marko.asplund_at_gmail.com>
Date: Wed, 21 Aug 2013 08:45:30 +0300

Daniel Kirkdorffer wrote:
> I'll try to get around to file bugs on these as you suggest. One thing
about the example app, if I recall correctly from looking at it, it
> does include annotations on some classes, and so I'm wondering if that's
why the XML config is being picked up. There were some > exchanges
yesterday about this anomaly, where if you added an annotation (@Component
or @Inject, for example) then suddenly
> injection worked, but without them and just relying on XML it wouldn't.

Yes, you're correct.
The new Jersey 2 Spring integration will do injection on your JAX-RS
classes based on annotations.
If the injected dependencies have further dependencies configured via
Spring XML configuration, those dependencies should get injected.

marko