Spring pagination - request parameters : <p>My REST contorller:</p>

<pre><code>    @GetMapping("/test")
    public Page&lt;MyObject&gt; pathParamTest(Pageable pageable) {
        return myService.getPage(pageable);
    }
</code></pre>

<p>I send a request like following:</p>

<pre><code>localhost:8091/endpoint/test?page=0&amp;size=3&amp;sort=id&amp;direction=DESC
</code></pre>

<p>It's my response from server:</p>

<pre><code>{
    "content": [
        {
            "id": 1
        },
        {
            "id": 2
        },
        {
            "id": 3
        }
    ],
    "last": true,
    "totalPages": 1,
    "totalElements": 3,
    "first": true,
    "sort": [
        {
            "direction": "ASC",
            "property": "id",
            "ignoreCase": false,
            "nullHandling": "NATIVE",
            "descending": false,
            "ascending": true
        }
    ],
    "numberOfElements": 3,
    "size": 3,
    "number": 0
}
</code></pre>

<p>but the request has still direction = ASC.</p>

<p>How can I send to server direction = DESC?</p>

<p>And why response has a field "last" = true, because next page has one element more?</p>
