Pageable pagesize greater than 2000? throw exception

时间:2019-04-16 23:08:08

标签: spring pagination

I would like to know is there a way to throw an exception if user requests the pagesize > Pageable pagesize limit (2000).

Currently, if I request 3000 records, it quietly returns 2000 records. I want to throw an exception in this case.

Any suggestions?

0 个答案:

没有答案