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 无法加载或扫描独立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>