@RequestParam如何接收List引數
阿新 • • 發佈:2021-05-15
@RequestMapping(value = "hello", method = {RequestMethod.POST})
@ResponseBody
public boolean hello(@RequestParam(value = "userIds") List<Long> userIds) {
return false;
}
針對於這種 前端如何傳遞引數?
POST http://localhost:8081/hello Content-Type: application/x-www-form-urlencoded userIds=[12976923,1111]
如果這樣傳參 後端接收的是
那前端如何傳遞引數?
POST http://localhost:8081/hello Content-Type: application/x-www-form-urlencoded userIds=12976923,1111
如果這樣傳參 後端接收的是