-
Notifications
You must be signed in to change notification settings - Fork 678
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
Introduce argument resolver for OffsetScrollPosition
#2856
Comments
We do not have a good way to capture the keyset type. For offset-based positions, we could provide something. Feel free to submit a pull request. We should provide argument resolves for the servlet- and the reactive stack. |
I will try |
For Given @GetMapping("/users")
public Window<User> scroll(@SortDefault(sort = "id", direction = ASC) Sort sort,
@RequestParam(defaultValue = "10") int limit, KeysetScrollPosition position) {
Specification<User> spec = (root, query, cb) -> null;
return this.userRepository.findBy(spec, q -> q.limit(limit).sortBy(sort).scroll(position));
} Use implicit
Use explicit
Use explicit
The key problem is how to convert keys to correct type, maybe we should introduce an annotation to extract actual type from underlying domain object, for example @TypeHints(from = User.class) KeysetScrollPosition position WDYT? @mp911de |
OffsetScrollPosition
Just like
org.springframework.data.web.PageableHandlerMethodArgumentResolver
did forPageable
The text was updated successfully, but these errors were encountered: