spring-projects / spring-projects/spring-data-commons
EnableSpringDataWebSupport causes paging to ignore properties
@mp911de is already working on this.
Since Jul 14, 2025.
- Dominant language
- Java
- Stars
- 838
- Forks
- 730
- PR merge metrics
- No merged PRs in 30d
Description
Spring Boot : 3.4.6
Spring Data Commons : 3.4.6
When @EnableSpringDataWebSupport(pageSerializationMode = VIA_DTO) is used as described in https://docs.spring.io/spring-data/commons/reference/repositories/core-extensions.html#core.web.pageables
The properties defined under spring.data.web.pageable are ignored. e.g. max-page-size
Workaround :
... Configuration class implementing PageableHandlerMethodArgumentResolverCustomizer
/*
Workaround
A PageableHandlerMethodArgumentResolver bean is instantiated by SpringDataWebConfiguration. As a result
SpringDataWebAutoConfiguration cannot call pageableCustomizer to load the properties defined in SpringDataWebProperties.
*/
@Override
public void customize(PageableHandlerMethodArgumentResolver pageableResolver) {
pageableResolver.setMaxPageSize(5000);
pageableResolver.setFallbackPageable(Pageable.unpaged());
}
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.