您的位置:首页 > 移动开发

JPA无法扫描jar包中Entity的问题,Xxx is not Mapped

2016-06-13 13:23 489 查看
JPA 无法加载或扫描独立JAR包中@Entity实体类或者映射文件,并报错unkonwn entity或者Xxx is not Mapped

1,在JPA的配置文件persistence.xml下,添加jar包配置:<jar-file>lib/***.jar</jar-file>。

2,在JPA配置文件persistence.xml中,添加实体类配置:<class>***.***.Xxx</class> 
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  jpa entity Hibernate