This problem seems to be due to the fact that Spring MVC is unable to parse List<FilterCriterion>
directly as a request parameter by default.
Here's my solution.
Wrap the List parameter with another entity class
@GetMapping
public Page<Application> search(Pageable pageable, @Valid FilterCriterionDTO filters) {
return Page.empty();
}
This is the new entity class
public class FilterCriterionDTO {
@Valid
private List<FilterCriterion> filters;
// getters, setters
}
If this is not what you meant by your question, please let me know.