users@jersey.java.net

[Jersey] Re: [JERSEY2.2] Injecting a Spring beans in Jersey resources / exception manager

From: <marceloverdijk_at_gmail.com>
Date: Fri, 23 Aug 2013 14:12:58 +0000 (UTC)

Hi Ivar, first of all thanks for your reply

I looked at your example but it doesn't contain an exception mapper.

I've setup an example myself:
https://github.com/marceloverdijk/jersey2-spring3

It contains an GlobalExceptionMapper being configured in
applicationContenxt.xml and registered in MyApplication.java (the
Jersey app). This GlobalExceptionMapper also has @Component and
@Provider annotations.

The issue is this exception mapper does not kick in. The single
HelloResource the project contains has a resource action which throws
an exception, but for some reason it's not handled by my
GlobalExceptionMapper.