当项目中集成Spring data JPA 或者hibernate,如图:

Springboot data JPA 报No property xxx found for type xxx!

运行报No property username found for type Login!错误

原因:

Springboot data JPA 报No property xxx found for type xxx!

我的login  Entity表里没有name字段,而是username,系统会把Springboot data JPA 报No property xxx found for type xxx!红色箭头部分当作实体类的一个属性,所以报错,两者只要一致就可以了。

相关文章:

  • 2022-12-23
  • 2022-02-19
  • 2022-01-09
  • 2022-12-23
  • 2021-10-03
  • 2021-07-01
  • 2021-04-21
猜你喜欢
  • 2022-12-23
  • 2021-06-21
  • 2021-06-26
  • 2022-12-23
  • 2021-04-06
  • 2021-12-31
  • 2021-08-30
相关资源
相似解决方案