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

當項目中集成Spring data JPA 或者hibernate,如圖: 運行報No property username found for type Login!錯誤 原因: 我的login  Entity表裏沒有name字段,而是username,系統會把紅色箭頭部分當作實體類的一個屬性,所以報錯,兩者只要一致就可以了。
相關文章
相關標籤/搜索