put请求不成功
@PutMapping(value = "/personupdate/{id}")
public Person personupdate(@PathVariable("id") Integer id,
@RequestParam("name") String name,
@RequestParam("age") Integer age){
Person person = new Person();
person.setId(id);
person.setName(name);
person.setAge(age);
return personRepository.save(person);
}这是方法
报错信息如下
{
"timestamp": 1528183498443,
"status": 400,
"error": "Bad Request",
"exception": "org.springframework.web.bind.MissingServletRequestParameterException",
"message": "Required String parameter 'name' is not present",
"path": "/personupdate/1"
}