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

错误提示:
[color=red][b]Null value was assigned to a property of primitive type setter of com.entity.hs.HSNotice……[/b][/color]

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


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

你可能感兴趣的:(错误解决)