Code: Select all
@GetMapping
public Page search(Pageable pageable, List filters) {
return Page.empty();
}
< /code>
FilterCriterion.java
Code: Select all
public class FilterCriterion {
private @NotBlank @Size(min = 1, max = 255) String column;
private @NotNull FilterOperation operation;
private @Size(max = 255) String value;
// getters, setters, no-args and all-args constructor
}
< /code>
FilterOperation.java
Code: Select all
public enum FilterOperation {
EQUALS,
NOT_EQUALS,
CONTAINS,
LT,
LTE,
GT,
GTE
}
Beim Senden von GET wie diese
Code: Select all
http://localhost:8080/departments?page=0&size=10&sort=name,asc&filters[0].column=name&filters[0].operation=EQUALS&filters[1].value=foo
Ich erhalte diesen Fehler:
Code: Select all
java.lang.IllegalStateException: No primary or single unique constructor found for interface java.util.List
< /code>
Changing List