springboot配置
方式一:
mybatis-plus:
configuration:
log-impl: org.apache.ibatis.logging.stdout.StdOutImpl #打印sql日志
map-underscore-to-camel-case: false #下划线转驼峰
mapper-locations: classpath*:mapper/*.xml #mapper配置文件路径
global-config:
db-config:
id-type: auto #主键生成策略
方式二
@Data
@ToString
@AllArgsConstructor
@NoArgsConstructor
@TableName(value = "boot_user")
public class User implements Serializable {
private static final long serialVersionUID = 1L;
@ApiModelProperty("用户id")
@TableId(value = "id", type = IdType.AUTO)
private Integer id;
}