Package org.springframework.data.web
Annotation Interface SortDefault
@Documented
@Retention(RUNTIME)
@Target(PARAMETER)
@Repeatable(SortDefaults.class)
public @interface SortDefault
Annotation to define the default
Sort
options to be used when injecting a Sort
instance into a
controller handler method.- Since:
- 1.6
- Author:
- Oliver Gierke, Mark Palich
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic @interface
Wrapper annotation to allow declaring multipleSortDefault
annotations on a method parameter. -
Optional Element Summary
-
Element Details
-
value
Alias forsort()
to make a declaration configuring fields only more concise.- Returns:
- Default:
- {}
-
sort
The properties to sort by default. If unset, no sorting will be applied at all.- Returns:
- Default:
- {}
-
direction
Sort.Direction directionThe direction to sort by. Defaults toSort.Direction.ASC
.- Returns:
- Default:
- ASC
-
caseSensitive
boolean caseSensitiveSpecifies whether to apply case-sensitive sorting. Defaults to true.- Returns:
- Since:
- 2.3
- Default:
- true
-