![](https://img-blog.csdnimg.cn/20201014180756913.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
工具类
大麦是只编程猫
DevOps 前端 后端 数据库 网络 都感兴趣~
展开
-
LocalDateTime的json格式化问题
LocalDateTime的json格式化问题 package com.atguigu.srb.base.config; import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer; import org.springframework.beans.factory.annotation.Value; import org.springframework.boot.autoconfigure.jackson.Jackson原创 2021-05-25 13:55:05 · 561 阅读 · 0 评论 -
ListToTreeUtil(从数据库查出List转成Tree)
ListToTreeUtil(从数据库查出List转成Tree)一、实体二、使用工具类直接生成 前言:在开发中,经常会碰到需要将数据库中的List转换成一个Tree,例如:评论列表、系统菜单、部门关系、商品分类等等。这个工具类就是用来直接将数据库中的List数据,根据parentId和id字段将其直接转成一个前端可以使用的Tree。 一、实体 @Data @JsonInclude(JsonInclude.Include.NON_NULL) public class SumTree<T> {原创 2021-04-06 15:18:19 · 570 阅读 · 0 评论