Springboot+jpa分页查询

springboot+JPA分页方法:

PageRequest of = PageRequest.of(pageNum, pageSize);
Page paged = systemLogRepository.getByPaged(of);

DAO层
@Query(nativeQuery = true, value = “SELECT * from user”)
Page getByPaged(Pageable pageable);

你可能感兴趣的:(随笔)