一、对json里面内容建立实体类
@Data
@AllArgsConstructor
@NoArgsConstructor
public class RouteMetaEntity {
private String title;
private Boolean affix;
private Boolean isAlwaysShow;
}
二、主类做映射
@TableField(typeHandler = JacksonTypeHandler.class)
private RouteMetaEntity meta;
三、如果在mybatis的xml文件中
<resultMap id="xxxx" type="com.example.system_manage.entity.主实体类">
<result column="meta" typeHandler="com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler" property="meta" />
</resultMap>