如:
@NotBlank(message = "用户姓名不能为空")
1 private String name;
@NotBlank(message = "密码不能为空")
@Size(min = 6, message = "密码长度不能少于6位")
2 private String password;
@Min(value = 0, message = "年龄不能小于0岁")
@Max(value = 1120, message = "年龄不应超过120岁")
3private Integer age;
@Pattern(regexp = "^((13[0-9])|(15[^4])|(18[0-9])|(17[0-9])|(147))\d{8}$", message = "手机号格式不正确")
4 private String phone;