Annotation Interface RestrictedPageable
Marks a
Pageable controller method parameter
as subject to field-level sorting restrictions.
When applied, the pageable argument is validated so that sorting is only
allowed on entity fields explicitly annotated with Sortable. Entity
metadata and alias mappings are resolved from WebQuery on the same
controller method.
This annotation does not affect pagination parameters
such as page number or page size. It only governs which fields may be used
in sort query parameters.
The validation is enforced by a custom
HandlerMethodArgumentResolver
before the controller method is invoked.
Example usage:
@GetMapping
@WebQuery(entityClass = User.class)
public Page<User> search(
@RestrictedPageable Pageable pageable
) {
...
}