How to configure PageableHandlerMethodArgumentResolver in spring boot application
<p>I have a spring boot application and I want to configure <code>PageableHandlerMethodArgumentResolver</code>, I try the following code, but doesn't not work:</p>

<pre><code>@Configuration
public class WebConfig extends WebMvcConfigurerAdapter {

    // .......

    @Override
    public void addArgumentResolvers(List&lt;HandlerMethodArgumentResolver&gt; argumentResolvers) {
        PageableHandlerMethodArgumentResolver resolver = new PageableHandlerMethodArgumentResolver();
        resolver.setFallbackPageable(new PageRequest(0, 50));
        argumentResolvers.add(resolver);
        super.addArgumentResolvers(argumentResolvers);
    }
}
</code></pre>

<p>Controller method:</p>

<pre><code>@Override
@PreAuthorize("hasRole('ROLE_SYS_ADMIN')")
@RequestMapping(method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE)
public ResponseEntity&lt;Page&lt;Account&gt;&gt; query(@QuerydslPredicate Predicate predicate,
        @PageableDefault Pageable pageable) {
    return new ResponseEntity&lt;&gt;(accountRepo.findAll(predicate, pageable), HttpStatus.OK);
}
</code></pre>

<p>And it is a simple Boot App, just playing with spring boot, with No Empty WebConfig Configuration class</p>

<pre><code>@Configuration
public class WebConfig {

    @Bean
    public Filter html5ModeFilter() {
        return new Html5ModeFilter();
    }
}
</code></pre>

<p>And here's a list of my config classes:</p>

<pre><code>Html5ModeFilter.java
SecurityConfig.java
ServletInitializer.java
UserDetailsAdapter.java
WebConfig.java
</code></pre>