/** * Creates a {@link Link} with the given rel that will be based on the given {@link UriTemplate} but enriched with the * values of the given {@link Pageable} (if not {@literal null}). * * @param base must not be {@literal null}. * @param pageable can be {@literal null} * @param rel must not be {@literal null} or empty. * @return */ private Link createLink(UriTemplate base, Pageable pageable, String rel) { UriComponentsBuilder builder = fromUri(base.expand()); pageableResolver.enhance(builder, getMethodParameter(), pageable); return new Link(new UriTemplate(builder.build().toString()), rel); }