title: Spring REST PagingAndSortingRepository wont display 'nex't & 'previous' links
body: <p>I am trying to implement PagingAndSortingRepository from spring boot data REST.</p>
  
  <p>It certainly does return a paged response, however i cant find a way to get it to display navigation links between pages. I have looked at quite a few tutorials and documentation on this, and it seems that it should just happen as a consequence of using the PagingAndSortingRepository that is provided.</p>
  
  <p>Please advise me someone! it should be so simple.
  Thanks in advance.</p>
  
  <p>Classes:</p>
  
  <pre><code>@RestController
  public class CommentController {
  
  private final CommentFacade facade;
  
  @Autowired
  public CommentController(CommentRepository commentdao) {
  
      this.facade = new CommentFacadeImpl(commentdao);
  }
  
  
  @RequestMapping(value = "/comments", method = RequestMethod.GET)
  public PagedResources&lt;Resource&lt;Comment&gt;&gt; getPagedList(@RequestParam(value = "user-id", required = true) Long userId) {
  
      Pageable pageable = new PageRequest(1, 10);
  
      Page&lt;Comment&gt; commentsList =  facade.findAll(pageable);
  
      List&lt;Resource&lt;Comment&gt;&gt; resourceList = new ArrayList&lt;&gt;();
  
      for (Comment comment : commentsList) {
  
          Resource&lt;Comment&gt; commentResource = new Resource&lt;&gt;(comment);
  
          commentResource.add(linkTo(methodOn(CommentController.class)
                  .getSpecificComment(comment.getId())).withSelfRel());
  
          resourceList.add(commentResource);
      }
  
      PagedResources&lt;Resource&lt;Comment&gt;&gt; resources = new PagedResources&lt;&gt;(resourceList,
              new PageMetadata(commentsList.getNumber(), commentsList.getTotalElements(), commentsList.getTotalPages(), 5),
              linkTo(methodOn(CommentController.class)
                      .getPagedList(userId)).withSelfRel());
  
      return resources;
  }
  </code></pre>
  
  <p>}</p>
  
  <pre><code>@RepositoryRestResource
  public interface CommentRepository extends     PagingAndSortingRepository&lt;Comment, Long&gt; {
  
  Page findAll(Pageable pageRequest);
  </code></pre>
  
  <p>}</p>
  
  <pre><code>@Entity
  @Table(name="comment")
  @EnableEntityLinks
  @RepositoryRestResource
  public class Comment  {
  
  @Id
  @GeneratedValue(strategy= GenerationType.AUTO)
  @Column(name="id")
  private @JsonIgnore Long id;
  
  @Column(name="created")
  private Date created;
  
  @Column(name="latitude")
  private @JsonIgnore Float latitude;
  
  @Column(name="longitude")
  private @JsonIgnore Float longitude;
  
  @Column(name="ip")
  private @JsonIgnore String ip;
  
  @Column(name="text")
  private String comment;
  
  
  @Column(name="sender_id")
  private Long senderId;
  
  @JsonIgnore
  private Long postId;
  
  @JsonIgnore
  @Column(name="deleted")
  private Boolean deleted;
  
  protected Comment() {};
  
  public Comment(String comment, Long senderId, Long post_id) {
      this.id = null;
      this.created = new Date();
      this.latitude = 12.1111111138563456f;
      this.longitude = -17.444333333333f;
      this.ip = "34.6.5.213";
      this.comment = "some comment";
      this.senderId = 1L;
      this.postId = post_id;
      this.deleted = false;
  }
  
  public Long getId() {
      return id;
  }
  
  public void setId(Long id) {
      this.id = id;
  }
  
  public Date getCreated() {
      return created;
  }
  
  public void setCreated(Date created) {
      this.created = created;
  }
  
  public Float getLatitude() {
      return latitude;
  }
  
  public void setLatitude(Float latitude) {
      this.latitude = latitude;
  }
  
  public Float getLongitude() {
      return longitude;
  }
  
  public void setLongitude(Float longitude) {
      this.longitude = longitude;
  }
  
  public String getIp() {
      return ip;
  }
  
  public void setIp(String ip) {
      this.ip = ip;
  }
  
  public String getComment() {
      return comment;
  }
  
  public void setComment(String comment) {
      this.comment = comment;
  }
  
  public Long getSenderId() {
      return senderId;
  }
  
  public void setSenderId(Long senderId) {
      this.senderId = senderId;
  }
  
  @ManyToOne
  @JoinColumn(name = "post_id")
  @JoinTable(name = "post")
  public Long getPostId() {
      return postId;
  }
  
  public void setPostId(Long postId) {
      this.postId = postId;
  }
  
  public Boolean getDeleted() {
      return deleted;
  }
  
  public void setDeleted(Boolean deleted) {
      this.deleted = deleted;
  }
  </code></pre>
  
  <p>}</p>
  
  <p>My JSON HAL output:</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>{
    "_embedded": {
      "commentList": [
        {
          "created": 1468176648000,
          "comment": "some comment",
          "senderId": 1,
          "_links": {
            "self": {
              "href": "http://localhost:8090/comments/11"
            }
          }
        },
        {
          "created": 1468176649000,
          "comment": "some comment",
          "senderId": 1,
          "_links": {
            "self": {
              "href": "http://localhost:8090/comments/12"
            }
          }
        },
        {
          "created": 1468176650000,
          "comment": "some comment",
          "senderId": 1,
          "_links": {
            "self": {
              "href": "http://localhost:8090/comments/13"
            }
          }
        },
        {
          "created": 1468176650000,
          "comment": "some comment",
          "senderId": 1,
          "_links": {
            "self": {
              "href": "http://localhost:8090/comments/14"
            }
          }
        },
        {
          "created": 1468176651000,
          "comment": "some comment",
          "senderId": 1,
          "_links": {
            "self": {
              "href": "http://localhost:8090/comments/15"
            }
          }
        },
        {
          "created": 1468176651000,
          "comment": "some comment",
          "senderId": 1,
          "_links": {
            "self": {
              "href": "http://localhost:8090/comments/16"
            }
          }
        },
        {
          "created": 1468176678000,
          "comment": "some comment",
          "senderId": 1,
          "_links": {
            "self": {
              "href": "http://localhost:8090/comments/17"
            }
          }
        },
        {
          "created": 1468176679000,
          "comment": "some comment",
          "senderId": 1,
          "_links": {
            "self": {
              "href": "http://localhost:8090/comments/18"
            }
          }
        },
        {
          "created": 1468176679000,
          "comment": "some comment",
          "senderId": 1,
          "_links": {
            "self": {
              "href": "http://localhost:8090/comments/19"
            }
          }
        },
        {
          "created": 1468176680000,
          "comment": "some comment",
          "senderId": 1,
          "_links": {
            "self": {
              "href": "http://localhost:8090/comments/20"
            }
          }
        }
      ]
    },
    "_links": {
      "self": {
        "href": "http://localhost:8090/comments?user-id=1"
      }
    },
    "page": {
      "size": 1,
      "totalElements": 4,
      "totalPages": 5,
      "number": 38
    }
  }</code></pre>
  </div>
  </div>
  </p>
  
  <p>Seems to work, but no navigation links. Any ideas?</p>