users@jersey.java.net

[Jersey] Re: Jersey 2.2 Spring Integration issues

From: Daniel Kirkdorffer <dankirkd_at_comcast.net>
Date: Tue, 20 Aug 2013 22:58:14 -0700

Interesting. That probably should be called out in the documentation,
because while I had seem allusions to the fact it relies on annotations, I
couldn't find anything to confirm that. Plus, as there may be plenty of
reasons to need to use XML configurations, it probably should also be
pointed out they can still be used to supplement the annotation driven
wiring.
 
Thanks,
 
Dan

-----Original Message-----
From: Marko Asplund [mailto:marko.asplund_at_gmail.com]
Sent: Tuesday, August 20, 2013 10:46 PM
To: users_at_jersey.java.net
Subject: [Jersey] Re: Jersey 2.2 Spring Integration issues



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