how can i implement a pagination in spring jdbcTemplate

后端 未结 4 1854
时光取名叫无心
时光取名叫无心 2021-01-13 23:22

here is my following dao implementaion

@Override
    public List getAddresses(int pageid,int total) {

        String sql = \"select * FRO         


        
4条回答
  •  梦谈多话
    2021-01-14 00:09

    You don't have to create own implementation logic for pagination. Use Spring's PagedListHolder, it's suitable and configurable for pagination purposes.

    Here you can see an example implementation: Spring Pagination Example.

提交回复
热议问题