springBoot use PageHelper when the data exceeds the maximum number of pages still returns

When using PageHelper pagination plug-in SpringBoot in, if you set pagehelper.reasonable = true, pageNum <= will check the first page 0, pageNum> pages (more than the total number), queries the last page

That is even greater than the total number of pages of incoming pages will still return data

In the configuration file, the  pagehelper.reasonable  changed to  false  to

pagehelper.reasonable=false

Official documentation wrote:

reasonable: Paging rationalization parameter defaults to false. When this parameter is set to true, pageNum <= 0, the first page queries, pageNum> pages (more than the total number), the last page queries. Default false, according to a direct query parameters.

Guess you like

Origin www.cnblogs.com/baobeiqi-e/p/11459939.html