How can I simply add a link to a Spring Data REST Entity
I have my Entities with Spring Data JPA, but to generate stats about them, I use jOOQ in a Spring @Repository . Since my methods return either a List of entities, or a Double , how can I expose them as links? Let's say I have a User entity, I want to get the following JSON: { "_embedded" : { "users" : [ ] }, "_links" : { "self" : { "href" : "http://localhost:8080/api/users" }, "stats" : { "href" : "http://localhost:8080/api/users/stats" } "profile" : { "href" : "http://localhost:8080/api/profile/users" } }, "page" : { "size" : 20, "totalElements" : 0, "totalPages" : 0, "number" : 0 } } And in