Why I use Spring MVC to create RESTful Web Services

I’m a pretty standard Java guy, so basically I have two options: JAX-RS and Spring MVC.

Header mapping

http://docs.spring.io/spring/docs/3.1.x/javadoc-api/org/springframework/web/bind/annotation/RequestMapping.html#headers()

___________________________________________

Injection even for a simple use case Injection, JAX-RS doesn’t work out of the box in Jersey 2.0 (the reference implementation).

Well, it is doable using a Binder.

http://stackoverflow.com/questions/16216759/dependency-injection-with-jersey-2-0

https://hk2.java.net/hk2-api/apidocs/org/glassfish/hk2/utilities/binding/AbstractBinder.html

___________________________________________

Async support

http://docs.spring.io/spring/docs/3.2.0.BUILD-SNAPSHOT/api/org/springframework/web/context/request/async/DeferredResult.html

http://notpurelytechnical.com/spring-3-2-rundown-async-support/

JAX-RS 2.0 (part of Java EE 7), is supposed to support it but my tests result on all sort of errors………is no final yet

___________________________________________