使用@NotBlank遇到的问题
解决:
* @NotNull
* 不能为null,但可以为empty (""," "," ")
* 2.@NotEmpty
* 不能为null,而且长度必须大于0 (" "," ") 只能使用在字符串上
* 3.@NotBlank
* 只能作用在String上,不能为null,而且调用trim()后,长度必须大于0 ("test") 即:必须有实际字符
使用@NotBlank遇到的问题
解决:
* @NotNull
* 不能为null,但可以为empty (""," "," ")
* 2.@NotEmpty
* 不能为null,而且长度必须大于0 (" "," ") 只能使用在字符串上
* 3.@NotBlank
* 只能作用在String上,不能为null,而且调用trim()后,长度必须大于0 ("test") 即:必须有实际字符