zl程序教程

您现在的位置是:首页 >  后端

当前栏目

SpringMVC @RequestBody 接收Json数组对象

SpringMVC对象数组JSONJSON 接收 RequestBody
2023-09-14 08:59:55 时间
@RequestMapping(value="/signIn",method=RequestMethod.POST)
    public int saveUser(@RequestBody User user){//用json格式传入user对象的属性即可
        user.setId(IdGen.uuid());
        int i = userService.saveUser(user);return i;
    }