我正在尝试将json绑定到@RequestBody
控制器方法签名
public String update(@RequestBody MyDto myDto)
我的dto
public class MyDto {
String staff;
String user;
String email;
// constructor, getter, setter go here
}
json string
{
"staff":"its staffname",
"user": "its username",
"email": "myemail"
}
问题
员工和用户字符串在服务器端填充,但email field is null
when i change the name to something other than email the problem goes away