I want to specify filters for a CRUD
GETREST controller for a list of items.The items I do return have a name
name: String, a boolean propertyisFoo: booleanandlabels: Map<String, String>.My list controller uses
qfor thename-filter andisFoofor the boolean property.Now I want to filter on
labelsas well.Additionally I use
org.springframework.data.domain.Pageto return sub-sets.I declared it naively like this and tested by adding
labels=%7Ba%3Db%2C+c%3Dd%7D
@GetMapping("")
MyReturnType list(
@RequestParam(defaultValue = 0) final int page,
@RequestParam(defaultValue = 10) final int size,
@RequestParam(defaultValue = true) final boolean isFoo,
@RequestParam(required = false) final String q,
@RequestParam(required = false, name = "labels") final Map<String, String> labels) {
...
}
- However I get a HTTP 500
- How may I specify this?