with the help from @CodeChimp I realized that request that I was sending was not having proper accept headers. I used Chromes "Advanced Rest client" and added headers with key ="accept" and value ="application/json",I was able to get proper response.
update
I found that <mvc:annotation-driven />
was not added in the dispatcher servlet which configures the support for HTTP message conversion with @RequestBody/@ResponseBody.Once I added this piece of info there was no need to use any advanced Rest client.