Open spring-projects-issues opened 4 years ago
+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.
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.
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: https://github.com/spring-projects/spring-hateoas/issues/727