Hiberante Annotations Entity注解 (org.hibernate.MappingException: Unknown entity常见问题(新手需注意))
最近学习Hiberante Annotations时遇到了该问题org.hibernate.MappingException: Unknown entity在baidu和googl上搜寻了很久,最后发现是import Entity类造成的(使用Eclipse自动提示导入的该包)
错误引用:import org.hibernate.annotations.Entity;
正确引用:import javax.persistence.Entity;