title: Return Page<E> in Spring data JPA empty
body: <pre><code>@RestController
  @Transactional
  public class ApiController {
  
      @Autowired
      CategoryService categoryService;
  
      @SuppressWarnings("deprecation")
      @RequestMapping(value="/api/category/page", method=RequestMethod.GET)
      public Page&lt;Category&gt; getCategoryList() {
          return categoryService.findAll(new PageRequest(0, 10));
      }
  
  }
  </code></pre>
  
  <p>I would like to retrieve the Page  for use in the angularjs, which returns nothing: <code>{}</code>. While I <code>getContent ()</code> the data is still available on request:</p>
  
  <pre><code> [{"cid": 1, "cname": "Tien Hiep", "cmetaTitle": "tien-hiep", 
   "createDate": "May 6, 2018 1:04:58 PM "," createBy ":" Admin "," 
   modifiedDate ":" May 28, 2018 11:09:57 AM "," modifiedBy ":" Admin 
   "," cstatus " ..]
  </code></pre>
  
  <p>If I want to return the page type like:</p>
  
  <pre><code>    {
          "content":[
              {"cid": 1, "cname": "Tien Hiep", "cmetaTitle": "tien-hiep", "createDate": "May 6, 018 1:04:58 PM "," createBy ":" Admin "," modifiedDate ":" May 28, 2018 11:09:57 AM "," modifiedBy ":" Admin "," cstatus "}, 
              ...
          ],
          "last":false,
          "totalElements":10,
          "totalPages":4,
          "size":10,
          "number":0,
          "sort":null,
          "first":true,
      }
  </code></pre>
  
  <p>Can anybody help me fix that?</p>