Is it possible to have spring data rest repositories supporting both json and xml at the same time? I was hoping that something like that would work (but it doesn't unfortunately):
@RequestMapping(produces = { "application/json", "application/xml" })
@RepositoryRestResource
What you need is to configure content negotiation in Spring Web MVC.
Follow this blog post for more information.