Simple problem:
@Controller
class MyController {
@RequestMapping(...)
void test(MyModel m) {
...
}
}
class MyModel {
MyNestedModel a;
}
class MyNestedModel {
@RequestParam("b[]")
List<String> b;
}
This apperantly does not work, because @RequestParam
only works with method parameters.
Is there a way to define the name of the request param within the model object?
Reason:
My MyModel
and MyNestedModel
classes is of course much bigger and I'd like to use for example ?a.b[]=TEST
.
Thanks for your help :)
EDIT: Looks like this is exactly my problem: How to customize parameter names when binding spring mvc command objects