springboot使用遇到问题:Class “model.Address” is listed in the persistence.xml file but not mapped

报错如下:

springboot使用遇到问题:Class “model.Address” is listed in the persistence.xml file but not mapped

解决如下:

这是一个Eclipse的怪癖。我最近在创建一个禁用了JPA库配置的新JPA项目时遇到了这个问题,但是我通过Eclipse New JPA Entity向导创建实体之前没有手动配置JPA库。创建实体后,我在项目的构建路径中配置了JPA库(只需在库中添加目标Java EE服务器运行时),但验证错误仍然存​​在。我可以通过以下至少一种方式解决它:

  1. 右键单击persistence.xml文件,JPA工具 - > 同步类列表
  2. 或者,右键单击项目,验证
  3. 或者,关闭/重新打开项目。

springboot使用遇到问题:Class “model.Address” is listed in the persistence.xml file but not mapped

上一篇:详解Android数据存储技术


下一篇:Nginx如何处理一个请求