SpringMVC @RequestBody 接收Json数组对象
@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; }
@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; }