mmc18 mmc18 - 1 month ago 6x
reST (reStructuredText) Question

Spring Restfull Jax-RS annotation support

I have following class and web.xml files. Does spring framework supports jax-rs annotation such as

, and

In other word can I use
instead of


import org.springframework.stereotype.Controller;

public class RegisterServices {
public Response create(@Context HttpServletRequest requestContex,
@HeaderParam("Authorization") String authorization,
String xMsisdn, String param) {}



<servlet-name>Jersey REST Service</servlet-name>

<servlet-name>Jersey REST Service</servlet-name>


No, you cannot use* annotations in spring. You can use something like resteasy with spring. It is rather easy. If you need I can provide with an example. (Jersey and CXF has good JAX-RS implementations too.)

AFAIK Springsource has no idea to provide an implementation to JAX-RS. So if you want to use the features described in JAX-RS you will not get it directly from spring. But you can develop a rest web service using spring. That's a different story. A question was found on SO on that.