1、JPA @Id 和 @GeneratedValue 注解详解
加了@NotEmpty的String类、Collection、Map、数组,是不能为null或者长度为0的(String、Collection、Map的isEmpty()方法)
3、@NotBlank
和{@code NotEmpty}不同的是,尾部空格被忽略,也就是说,纯空格的String也是不符合规则的。所以才会说@NotBlank用于String。
4、@NotNull
这个就很好理解了,不能为null
加了@NotEmpty的String类、Collection、Map、数组,是不能为null或者长度为0的(String、Collection、Map的isEmpty()方法)