I am trying to catch other query parameters to a Map<String,String>
ex : http://url.example/route?lastIndex=10&sort=-afield&othera=test&otherb=test
I want othera
and otherb
to be stored in a map. Is it possible ?
class MyRequest {
private String lastIndex;
private String sort;
private Map<String,String> myFilters;
}
@RestControler
class MyController {
@GetMapping("/route")
public String get(MyRequest request) {
return "OK";
}
}