@GetMapping("/recent")
public CollectionModel<EntityModel<Taco>> recentTacos(){
PageRequest page=PageRequest.of(0, 12,Sort.by("createdAt").descending());
List<Taco> tacos=tacoRepo.findAll(page).getContent();
CollectionModel<EntityModel<Taco>> recentResources=CollectionModel.wrap(tacos);
recentResources.add(new Link("http://localhost:8080/design/recent","recents"));
return recentResources;
}
p.s. spring 최신버젼으로 직접 코딩하시는분만...