springmvc 数据绑定时,如何自动接受复合对象(已封装Bean)
如:
Bean{
map<Long,List<T>> map;
}
Bean{
map<Object,List<T>> map;
}
Bean{
map<Long,map<Integer,Integer>> map;
}
Bean{
map<Long,map<Integer,List<T>>> map;
}
....
求大神解答
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
在Controller里直接指定参数为Map是不行的,需要封装一个Bean来接收数据。可以看下这个视频:http://www.imooc.com/learn/558
前端post json过来,后端controller参数@RequestBody就可以了
前端post json过来,后端controller参数@RequestBody就可以了。
同意楼上的回答,是用post请求,@RequestBody会自动解析的