1

I am setting up a project using spring data rest. Exposing my domain model seems to work, but I have some strange behaviour:

According to the wiki/docs if I access a uri like /files/ I should end up with an array of links to the single files. But, I get not only the links to the files, but also the attributs of the files objects when accessing the uri /files/.

This is anoying, because I have the content of the files as byte[] and I end up transmitting all contents of all files when accessing /files/

Does anybody know how to turn this behaviour off?

Brian Tompsett - 汤莱恩
  • 5,753
  • 72
  • 57
  • 129

1 Answers1

1

Ok, I just found the answer myself. I am posting this for others with the same question...

I have to use the header: "Accept: application/x-spring-data-compact+json" in my request to get the compact representation of my repositories...

That's it...