How can I populate links to paged entities in Spring Boot?

20 Views Asked by At

I have a functioning @RestController backed by a JpaRepository with a JpaSpecificationExecutor.

My specification search is all working, and returns a Page<MyEntity>. Unfortunately, the paged entities do not have any of their HAL links (e.g. _links, _extensions, etc.). Is there an easy way to add these links automatically to the paged search results?

I've found the occasional forum post references to EntityLinks and linkToPagedResource(), but haven't had any luck getting them to work.
linkToPagedResource() is not showing up when I add hateoas to the pom.xml, and I'm not finding any examples of its use, so it's unclear if it's even what I'm looking for.

0

There are 0 best solutions below