springmvc 数据绑定时,如何自动接受复合对象(已封装Bean)
如:Bean{
map<Long,List<T>> map;
}Bean{
map<Object,List<T>> map;
}
Bean{
map<Long,map<Integer,Integer>> map;
map<Long,map<Integer,List<T>>> map;
....求大神解答
光阴似箭催人老,日月如移越少年。
在Controller裡直接指定參數為Map是不行的,需要封裝一個Bean來接收資料。可以看下這段影片:http://www.imooc.com/learn/558
前端post json過來,後端controller參數@RequestBody就可以了
前端post json過來,後端controller參數@RequestBody就可以了。 同意樓上的回答,是用post請求,@RequestBody會自動解析的
在Controller裡直接指定參數為Map是不行的,需要封裝一個Bean來接收資料。可以看下這段影片:http://www.imooc.com/learn/558
前端post json過來,後端controller參數@RequestBody就可以了
前端post json過來,後端controller參數@RequestBody就可以了。
同意樓上的回答,是用post請求,@RequestBody會自動解析的