Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Allow paging to be 1-based [DATACMNS-1668] #2088

Open
spring-projects-issues opened this issue Feb 14, 2020 · 2 comments
Open

Allow paging to be 1-based [DATACMNS-1668] #2088

spring-projects-issues opened this issue Feb 14, 2020 · 2 comments
Assignees
Labels
type: enhancement A general enhancement

Comments

@spring-projects-issues
Copy link

Greg Turnquist opened DATACMNS-1668 and commented

This started as a Spring HATEOAS issue, but it turns out, was actually observed in Spring Data REST. Spring Data REST's paging is based on Commons


Reference URL: spring-projects/spring-hateoas#727

@rhanton
Copy link

rhanton commented Sep 16, 2024

+1 - Java dev here, so I love the idea of 0-based pagination, but it seems to make non-Java-devs' brains hurt. Would be handy to have a toggle somewhere to change this over, ideally something that isn't just a property but something I can control from a spring-boot helper-library level.

@odrotbohm
Copy link
Member

You can use a bean of type PageableHandlerMethodArgumentResolverCustomizer to flip settings on PageableHandlerMethodArgumentResolver using setOneIndexedParameter(…). This setting has been available for over 10 years now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement A general enhancement
Projects
None yet
Development

No branches or pull requests

3 participants