Filtering data with Spring boot CrudRepository

前端 未结 2 1273
时光取名叫无心
时光取名叫无心 2020-11-29 11:30

I have a simple REST service which access data with Spring boot CrudRepository.

This repository already implements pagination and sorting capabilities l

2条回答
  •  谎友^
    谎友^ (楼主)
    2020-11-29 11:34

    Declare the below function in your repository [EDITED]

    Page findByIdBetween(Long start, Long end, Pageable pageable)
    

    Then you can invoke this function from the instance of repository. Please refer the spring-data reference for further info..

提交回复
热议问题