Pradeep bhatt wrote:why do we need this when we have jax-rs classes ?
I don't suppose you necessarily *need* it. In fact, Spring MVC's REST model isn't dramatically different than JAX-RS. But one thing I can do with Spring MVC that I don't think I can do with JAX-RS (correct me if I'm wrong) is develop a website that serves resources, regardless of what representation the client wants them. What I mean by that is that I can write a Spring MVC controller that serves a Product resource (for instance) and it will be served as XML to clients asking for XML, as JSON to clients asking for JSON and as HTML/PDF/etc to clients (such as web browsers) asking for those formats on behalf of their human users. Same resource...same controller...same everything, except that the proper representation is chosen based on what the client asks for. I'm sure JAX-RS can do something along those lines, but I'm not sure about the human aspect of it (again, correct me if I'm wrong).
Also, even though the programming models are quite similar, I find comfort in knowing that my web development skills that I gained while developing human-facing websites with Spring MVC carry over to developing machine-facing web resources.