使用hibernate的e-r映射pojo類的時候遇到org.hibernate.AnnotationException: No identifier specified for entity異常。在使用hibernate的映射表的時候entity類是必需要主鍵的,不然就會報出這個異常。ide
解決方法:spa
@Idhibernate
@Column(name = "id", unique = false, nullable = false)orm