In this recipe, we will focus on how to create links with Spring HATEOAS and how to bind them to resources.
We will detail the resource assemblers, which are reusable transition components used to pass from entities (such as
Index) to their resources (
IndexResource). These components also provide support for link creation.
import static org.sfw.hateoas.mvc.ControllerLinkBuilder.linkTo; import static org.sfw.hateoas.mvc.ControllerLinkBuilder.methodOn; ...