So I'm using Spring Boot in Java to write my API. I have a request coming in as such and (NOTE: there will be an indeterminate number of fields coming in, so this may be 100 to where a "field99=test99" will be part of the request):
www.example.com/api/examples?field=test&field1=test1&field2=test2
All of my request properties will have the name "field" in it, but I have no clue what number will be in the suffix. I currently have in my API the following parameter:
@RequestParam(value = "field", required = false) List<String> fields
Is there a wildcard matching situation that I could utilize here to make this work? It seems way too tedious/unrealistic to create 100 parameters called String field, String field1, String field2... How would I go about solving this problem so that all the request properties' values end up in my fields list (test, test1, test2, ...)?