的名单我开始绘制字符串的集合:Spring MVC的:GET复杂的对象
/abc?type=x,y,z
,我绘制了一组枚举
@RequestParam(value = "type") Set<MyEnum> types
现在我想补充另一参数分配给每种类型。例如像:
/abc?type=x:withProperty1,y:withProperty2,z:withProperty3
,并且理想地映射到某个容器
@RequestParam(value = "type") Set<MyContainer> containers
,然后列表:
class MyContainer {
MyEnum type
String property
}
是否有可能与Spring MVC?或者,我所能做的只是将其绑定到两个不同的列表:
/abc?type=x,y,z&properties=withProperty1,withProperty2,withProperty3
您能简单介绍一下您的问题? –
我需要扩展现有的API并通过pojos列表 – piotrek
嗨:)它对你有用。我搜索了你.http://www.studytrails.com/frameworks/spring/spring-mvc-controller-input。 jsp –