1. 程式人生 > >Org.Hibernate.AnnotationException: No Identifier Specified For Entity I don't have a id in my table

Org.Hibernate.AnnotationException: No Identifier Specified For Entity I don't have a id in my table

 

程式執行報錯:Org.Hibernate.AnnotationException: No Identifier Specified For Entity I don't have a id in my table

Entity中@Id導包導錯

應該是

import javax.persistence.Id;

而不是

import org.springframework.data.annotation.Id;