org.hibernate.AnnotationException

org.hibernate.AnnotationException: No identifier specified for entity: com.along.entity.emp

你是否也像我一样,因为注释的包错误,而找了近两个小时的程序问题呢

原因:  没有给实体类ID

解决方案:  加入@Id注释  这里不是spring的@Id,否则报错

posted @ 2020-05-19 19:13  龙欺  阅读(385)  评论(0)    收藏  举报