Null value was assigned to a property of primitive type setter of com.entity……

阅读更多
错误提示:
Null value was assigned to a property of primitive type setter of com.entity.hs.HSNotice……

解决办法:
Hibernate中配置的对象,所有的属性类型必须是对象类型。
如:
@Column(name="id",length=32)
private int id;//id
得改成:
@Column(name="id",length=32)
private Integer id;//id


一般出现的问题解决把
int修改为其包装类型Integer;
float修改为其包装类型Float;
……

你可能感兴趣的:(Null,value,was,assigned,Null,value,was,assigned,to,a,property,Null,value,was,assigned,to,a,property,of,primitive,type,setter,of)