学习jpa,整合spring和jpa测试时,报错如下
Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in class path resource [springjpa.xml]: Invocation of init method failed; nested exception is org.hibernate.AnnotationException: No identifier specified for entity: cn.ybzy.jpademo.model.User
Caused by: org.hibernate.AnnotationException: No identifier specified for entity: cn.ybzy.jpademo.model.User
怪我大意!注解写错了位置,检查了好久.......................
改: