Quantcast
Viewing all articles
Browse latest Browse all 128

How to use with Pageable ?

Hi,
I am newbie in spring + mongodb,
I want to know how to use with Pageable pageable,
I did function like this :

Code:

public Page<Domain> findByIp(String ip, Pageable pageable);
and I call it with :

Code:

List<Domain> page = repository.findByProjectId("1", new PageRequest(0, 100));
but if I call with

Code:

List<Domain> page = repository.findByProjectId("1", new PageRequest(1, 100));
there are the same results ...

So how to use it ? Can it support pagination ?
Tnx.

Viewing all articles
Browse latest Browse all 128

Trending Articles