title: The number of requests sent to the query
body: <p>I have a controller to sort users</p>
  
  <pre><code>@GetMapping(value = "/users", produces = MediaType.APPLICATION_JSON_VALUE)
  public HttpEntity&lt;List&lt;User&gt;&gt; getUsers(
          @RequestParam(required = false) String q,
          @RequestParam(required = false, defaultValue = "1") int page,
          @RequestParam(required = false, defaultValue = "1") int pageSize,
          @RequestParam(required = false, defaultValue = "id") String sort
  ) {
      return Optional
              .ofNullable(q)
              .map(v -&gt; ResponseEntity.ok().body(userService.findByUsernameContaining(q, page - 1, pageSize, new Sort(Sort.Direction.ASC, sort))))
              .orElseGet(() -&gt;
                      ResponseEntity.ok().body(userService.findAll(page - 1, pageSize, new Sort(Sort.Direction.ASC, sort)))
              );
  }
  </code></pre>
  
  <p>Which can take as parameter 4 values. It does not look too aesthetically and I wonder how it can be improved visually.</p>
  
  <ol>
  <li><p>I was wondering about creating a class with these four variables, and then creating a method registered @ModelAttribute. However, I quickly gave it up because I will not be able to set 'defaultValue' as necessary.</p></li>
  <li><p>The way I came up with this was to leave the parameter 'id' and the other three to make the 'Pegeable' object appended with '@PageableDefault' with the values set to 'size = 1, page = 1, sort = "id". However, this method also will not pass, because I necessarily need to subtract 1 from the value of 'page' when passing the page number to the site, and in this case it is impossible.</p></li>
  </ol>
  
  <p>Do you have any idea?</p>