[Jersey] Re: Spring and Jersey 2.0

From: Tang Yong <>
Date: Mon, 05 Aug 2013 18:41:52 +0900


The feature looks really strong!
After I have looked example, I have a question as following,

     private DateTimeService ds1;

     private DateTimeService ds2;

I can understand @Autowired is for Spring world, however,

I want to know for an user the difference between using @Autowired and
using @Inject?


Jakub Podlesak wrote:
> Hi Robert,
> There is a new jersey-spring module kindly contributed by Marko Asplund.
> The module includes Jersey 2/Spring 3 integration. Marko also added
> a new example [1].
> It would be great if you can give the example a try and provide feedback.
> Thanks,
> ~Jakub
> [1]
> On Aug 5, 2013, at 12:27 AM, Robert DiFalco <
> <>> wrote:
>> I'm not sure I understand the impact of Jersey 2.0 on Spring. Cannot
>> they not coexist at all or do I just need to ensure that my Jersey
>> resources and exception mappers are not Spring managed beans and not
>> injected with Spring managed beans?
>> I can live with the latter, but I don't want to work on migrating to
>> 2.0 to find out it just plain wont work. I don't use Spring MVC at
>> all. Just transactional, DI, and configuration stuff.
>> Any examples out there of Spring and Jersey 2.0 in the same
>> application? Thanks!
>> R.

Tang Yong
Senior Engineer
GlassFish Committer (OSGi & OSGi-JavaEE)
OSGi Alliance Supporter
Nanjing Fujitsu NanDa Software Tec CO.,LTD
Tel: +86-25-86630566-8310
Fax: +86-25-83317685