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;

  

 

posted @ 2017-09-28 11:07  喵喵2023  Views(175)  Comments(0Edit  收藏  举报