org.hibernate.validator.constraints.NotBlank' validating type 'java.lang.Integer

使用hibernate时,在save方法时,报了:org.hibernate.validator.constraints.NotBlank' validating type 'java.lang.Integer,因为@NotBlank是针对String的   。 解决方法是将实体类的注解换成     @NotNull,就行了,

替换前

替换后

原文地址:https://www.cnblogs.com/lengxiaofeng/p/7895845.html