How to configure Spring boot pagination starting from page 1, not 0

前端 未结 4 1620
别那么骄傲
别那么骄傲 2021-02-04 03:01

boot(1.4.0) \"Pageable\" for pagination.It works fine without any issue.But by default the page value starts from \"0\" but in the front-end the page value starts from \"1\". So

4条回答
  •  無奈伤痛
    2021-02-04 03:53

    Spring added this future as well. Just make oneIndexed parameter equals to true in your configuration file and pagination will start from page 1.By default its false and pagination starts from 0.

    spring.data.web.pageable.one-indexed-parameters=true
    

提交回复
热议问题