MybatisPlus实体类字段名与属性字段名不一致时,可以使用@Tablefiled注解
public class Student { @TableId(value = "s_id") private Integer id; @TableField(value = "s_name") private String name; @TableField(value = "s_birth") private String birth; @TableField(value = "s_sex") private String sex; }
其中主键需要使用@TableId注解