title: How can I use Pageable in @RestController?
body: <p>I know the <code>Pageable</code> comes from <code>spring-data-</code> domain.</p>
  
  <p>Is there any elegant way to directly use <code>org.springframework.data.domain.Pageable</code> in <code>@RestController</code>?</p>
  
  <p>I tried following.</p>
  
  <pre><code>@RequestMapping(method = RequestMethod.GET,
                  path = "pageable",
                  produces = MediaType.APPLICATION_JSON_VALUE)
  public ResponseEntity&lt;Pageable&gt; readPageable(@NotNull final Pageable pageable) {
      return ResponseEntity.ok(pageable);
  }
  </code></pre>
  
  <p>The result is not what I expected.</p>
  
  <pre><code>...: ~ $ curl -X GET --header 'Accept: application/json' 'http://localhost:8080/.../pageable?limit=1&amp;offset=1' | python -mjson.tool
  ...
  {
      "offset": 0,
      "pageNumber": 0,
      "pageSize": 20,
      "sort": null
  }
  </code></pre>