@Documented @Retention(value=RUNTIME) @Target(value=PARAMETER) public @interface PageableDefault
Pageable
into a controller
method. Instead of configuring sort()
and direction()
you can also use SortDefault
or
SortDefault.SortDefaults
.Modifier and Type | Optional Element and Description |
---|---|
Sort.Direction |
direction
The direction to sort by.
|
int |
page
The default-pagenumber the injected
Pageable should get if no corresponding
parameter defined in request (default is 0). |
int |
size
The default-size the injected
Pageable should get if no corresponding
parameter defined in request (default is 10). |
String[] |
sort
The properties to sort by by default.
|
int |
value
Alias for
size() . |
public abstract int value
size()
. Prefer to use the size()
method as it makes the annotation declaration more
expressive and you'll probably want to configure the page()
anyway.public abstract int size
Pageable
should get if no corresponding
parameter defined in request (default is 10).public abstract int page
Pageable
should get if no corresponding
parameter defined in request (default is 0).public abstract String[] sort
public abstract Sort.Direction direction
Sort.Direction.ASC
.Copyright © 2011-2013-2013 Pivotal. All Rights Reserved.