You can take a look at resteasy, which is an jax-rs implementation. Indeed it's a framework, but much lighter than Spring, and only designed to deal with annotation based rest services.
Example:
@Path("/test")
public class Endpoint {
@GET
@Produces("application/json")
public Response listAll(@QueryParam("start") Integer startPosition, @QueryParam("max") Integer maxResult) {
// all your code goes here
return Response.ok().build();
}
}
Setting up RestEasy is as easy as creating a class like this:
@ApplicationPath("/rest")
public class RestApplication extends Application {
}
Whereas the rest url is at localhost/{appname}/rest/test
Simply add resteasy maven dependency with:
<dependency>
<groupId>org.jboss.resteasy</groupId>
<artifactId>resteasy-jaxrs</artifactId>
<version>3.0.11.Final</version>
</dependency>
Resteasy docs:
http://docs.jboss.org/resteasy/docs/3.0.9.Final/userguide/html/index.html