controller 里 public Result<RetMsg> saveOrUpdate(@ModelAttribute ArrayList<TestModel> test) @ModelAttribute 要怎么绑定 list, 我试了报错,提示无法把 string 转 TestModel
前端提交的编码是 Content-Type: application/x-www-form-urlencoded
有没有例子,搜索了一圈,没找到
controller 里 public Result<RetMsg> saveOrUpdate(@ModelAttribute ArrayList<TestModel> test) @ModelAttribute 要怎么绑定 list, 我试了报错,提示无法把 string 转 TestModel
前端提交的编码是 Content-Type: application/x-www-form-urlencoded
有没有例子,搜索了一圈,没找到
|
putaozhenhaochiApr 18, 2020
1
前台传 json 数组,后台直接 @RequestBody List<XXX> list 接收
|
|
2
@putaozhenhaochi 搞定了,传 jsonarray 不行
|