@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

如果这样传参 后端接收的是

Logo

华为开发者空间,是为全球开发者打造的专属开发空间,汇聚了华为优质开发资源及工具,致力于让每一位开发者拥有一台云主机,基于华为根生态开发、创新。

更多推荐