I'm using org.springframework.data.domain.Pageable with my @RestController.
How can I validate or limit the page size?
Without any validation, when clients call with size of 10000. The actual pageSize is 2000.
This could lead wrong signal for last page, I think.
How can I validate it and notify clients about it? Say with 400?