Closed allut closed 4 years ago
I've managed to refactor the code. The working version should look as follows:
@Bean
public RepresentationModelProcessor<PagedModel<EntityModel<Taco>>> tacoProcessor(EntityLinks links) {
return new RepresentationModelProcessor<PagedModel<EntityModel<Taco>>>() {
@Override
public PagedModel<EntityModel<Taco>> process(PagedModel<EntityModel<Taco>> resource) {
resource.add(links.linkFor(Taco.class).slash("recent").withRel("recents"));
return resource;
}
};
}
Because of the migration to the Spring HATEOAS 1.0, the code in SpringDataRestConfiguration class doesn't work (most of the Representation models have been renamed, and their methods also have undergone some changes). I'm struggling with writing working code. Could anyone provide a working version of SpringDataRestConfiguration?