map字段实现字段处理器
需要在定义字段前添加注解来对应数据库中的字段信息@TableField(typeHandler = FastjsonTypeHandler.class)
同时添加类注解@TableName(autoResultMap = true),并在pom中配置Fastjson

然后在添加user信息时需要创建map对象,对信息进行封装,随后用set方法调用map对象获取信息

需要在定义字段前添加注解来对应数据库中的字段信息@TableField(typeHandler = FastjsonTypeHandler.class)
同时添加类注解@TableName(autoResultMap = true),并在pom中配置Fastjson

然后在添加user信息时需要创建map对象,对信息进行封装,随后用set方法调用map对象获取信息

