I see some are using Jersey w/ Spring. With Spring 3.0 there are now annotations available to make RESTful APIs directly in a controller. Why should I consider using Jersey w/ Spring?
Asked
Active
Viewed 1.0k times
2 Answers
4
Jersey pros:
- comes with specifications JSR 311
- reference implementation for JSR 311
- Restlet and RESTeasy are other implementations for JSR 311
- better tooling (at least on Netbeans)
- it is integrated with Spring and Guice
EDIT

dfa
- 114,442
- 31
- 189
- 228
-
1
-
Thanks! So, when using it with spring you are really just using Spring for the IoC functionality, etc? The controller will actually be a Jersey implementation? Hopefully I am understanding this correctly. – jr. Feb 02 '10 at 19:37
-
-
check out jersey-spring: https://jersey.dev.java.net/nonav/apidocs/latest/contribs/jersey-spring/index.html – dfa Mar 21 '10 at 09:26
-
Jersey has built in support for jsonp, spring 3 you have to write additional code to get it working. Otherwise the features are comparable – Kevin May 05 '12 at 16:05
0
Spring 3 is backwards compatible so you can use Jersey.
What you get is not tying your application to a propietary API.

Jeduan Cornejo
- 865
- 2
- 8
- 19
-
I tried to use Spring 3.0, but had some strange dependency issues I didn't feel like tracking down, so went back to 2.5.6.SEC01 and I am now fine. I'm sure I could have gotten it to work, but didn't think I needed anything from 3.0. So, I think I get it now. You can simply annotate the objects using the standard Java annotations for REST and then later change architectures. By using Spring you get all the benefits of the IoC and applicationContext to manage your objects. So, it kind of is the best of both. I have a working solution so far.. – jr. Feb 03 '10 at 04:15