Spring Boot整合jpa,启动项目报错:

Caused by: java.lang.IllegalArgumentException: Not a managed type: class com.example.demo.domain.DeptInfo

解决办法:

检查实体类的 @Entity 使用的是不是javax.persistence.Entity,id属性上的@Id使用的是不是javax.persistence.Id

Caused by: java.lang.IllegalArgumentException: Not a managed type: class com.example.demo.domain.DeptInfo

搞定!

相关文章:

  • 2021-09-15
  • 2022-12-23
  • 2021-11-04
  • 2021-09-02
  • 2022-12-23
  • 2021-06-27
  • 2022-12-23
  • 2021-09-15
猜你喜欢
  • 2022-12-23
  • 2021-10-12
  • 2022-12-23
  • 2022-12-23
  • 2021-06-25
  • 2021-08-05
  • 2022-12-23
相关资源
相似解决方案