在application.properties中添加配置
枚举按简单类型处理,如果有枚举字段则需要加上该配置才会做映射
mapper.enum-as-simple-type = true
或者
mapper:
enumAsSimpleType: true
在实体类的枚举字段加注解@ColumnType
/**
* 性别 男:MALE 女:FEMALE
*/
@ColumnType(jdbcType = JdbcType.VARCHAR)
private SexStatusEnum sex;