spring-projects / spring-projects/spring-data-commons
PageableHandlerMethodArgumentResolverSupport still uses page, size as the default parameter names
@odrotbohm is already working on this.
Since Jul 8, 2024.
- Dominant language
- Java
- Stars
- 838
- Forks
- 730
- PR merge metrics
- No merged PRs in 30d
Description
According to https://github.com/spring-projects/spring-data-commons/pull/2882, AbstractPageRequest has been changed field names to
- size -> pageSize
- page -> pageNumber
This change has impact to any Page<?> response. but https://github.com/spring-projects/spring-data-commons/blob/main/src/main/java/org/springframework/data/web/PageableHandlerMethodArgumentResolverSupport.java still uses
- private static final String DEFAULT_PAGE_PARAMETER = "page";
- private static final String DEFAULT_SIZE_PARAMETER = "size";
as a default params name, this may cause inconsistency.
Parameter names are changable using setPageParameterName, getPageParameterName but also be great default value is changed to
- private static final String DEFAULT_PAGE_PARAMETER = "pageNumber";
- private static final String DEFAULT_SIZE_PARAMETER = "pageSize";
as AbstractPageRequest was already been changed.
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.