Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

PageableHandlerMethodArgumentResolverSupport still uses page, size as the default parameter names #3120

Open
agongi opened this issue Jul 3, 2024 · 0 comments
Assignees
Labels
status: waiting-for-triage An issue we've not yet triaged

Comments

@agongi
Copy link

agongi commented Jul 3, 2024

According to #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.

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Jul 3, 2024
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
status: waiting-for-triage An issue we've not yet triaged
Projects
None yet
Development

No branches or pull requests

3 participants