JPQL是不支持关键词limit的,想使用,需要借助PageRequest对象
PageRequest.of(page,pageSize)
@Query("SELECT s FROM Students s ORDER BY s.id DESC")
List<Students> getLastStudentDetails(PageRequest pageRequest);
JPQL是不支持关键词limit的,想使用,需要借助PageRequest对象
PageRequest.of(page,pageSize)
@Query("SELECT s FROM Students s ORDER BY s.id DESC")
List<Students> getLastStudentDetails(PageRequest pageRequest);