Null value was assigned to a property of primitive type setter of

      

 Null value was assigned to a property of primitive type setter of
在Hibernate项目中,对象Int类型赋值时,数据中空值时会出现Null value was assigned to a property of primitive type setter of错误。
 解决方法:用Integer替换Int 
private Integer num;

public Integer getNum()...

public void setNum(Integer num)...

发表评论

电子邮件地址不会被公开。 必填项已用*标注