报错如下:

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

 

相关文章:

  • 2021-06-14
  • 2021-08-02
  • 2021-11-14
  • 2021-09-18
  • 2021-09-01
  • 2022-12-23
  • 2021-12-15
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-11-22
  • 2021-09-24
  • 2022-12-23
  • 2021-05-21
  • 2021-07-03
相关资源
相似解决方案