今天在IDEA里用代码直接生成表的时候报错:
No identifier specified for entity: com.example.mobile_cd.po.User
另附上一个简单的JPA配置及实例:
https://blog.csdn.net/qq_45128278/article/details/104986925

部分文件目录:

No identifier specified for entity: com.example.mobile_cd.po.User报错/springboot自动生成表报错

错误原因:

po包内的User.java中的包导入出错。因为导入的时候有两个选项:
一个是spring framake里的,一个是javax.persistence里的;应该导入后者。
下图是正确的。
No identifier specified for entity: com.example.mobile_cd.po.User报错/springboot自动生成表报错

相关文章:

  • 2022-12-23
  • 2022-02-08
  • 2022-01-17
  • 2022-12-23
  • 2022-01-17
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-05-11
  • 2022-02-11
  • 2021-10-22
  • 2021-11-24
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案