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 Li
For manually create links see spring-hateoas-examples.
Simplest wai is via new Resource if no DTO and extends ResourceSupport for DTO.
Links to spring-data-rest managed entity I've customized similar to links to root resource:
MyController implements ResourceProcessor> {
@Override
public Resource process(Resource resource) {
resource.add(linkTo(methodOn(MyController.class)
.myMethod(resource.getContent().getId(), ...)).withRel("..."));
return resource;
}
And for paged resourses
MyController implements ResourceProcessor>>
The problem is when you need both, as yor cannot extends both this interface due to generic type erasure. As a hack I've created dummy ResourceController