spring boot 异常汇总

spring boot JPA 异常:

org.springframework.data.mapping.PropertyReferenceException: No property role found for type

 JPA的 id 字段 不能写成role_id , 如果数据表需要用role_id 字段,只能加@Column标签改名

 @Id
 @GeneratedValue(strategy = GenerationType.AUTO)
 @Column(name="role_id")
  private Integer id;

  

原文地址:https://www.cnblogs.com/chuyuan/p/7605744.html