I\'m developing a Spring Boot Application for a shopping list. For this I use Spring Data Rest to export my entities through a REST API.
My Architecture looks like t
Try adding this Accept
header when you make the request:
Accept: application/x-spring-data-verbose+json
Also, take a look at this post where this is explained in details.
Define an excerpt projection for Article and configure into its repository with
excerptProjection
Any resource that has defined an excerpt projection will be added to _embedded
part fo the response. This applies to collecion resources of associations.
Read more at https://stackoverflow.com/a/30297320/1203628 or Spring Data REST reference documentation
An excerpt projection is used whenever an instance of the target type (Article in your case) is used within in an _embedded clause. Thus the excerpt is some kind of preview used everywhere the resource itself is not rendered but pointed to. This is usually the case from collection resources or for associations. Read more on this topic in the Spring Data REST reference documentation.