From 7dfe9d3148f9d5ffa972685583a0d8254697c4e1 Mon Sep 17 00:00:00 2001 From: Zheng Jie <201507802@qq.com> Date: Wed, 5 Jul 2023 11:36:37 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E4=BC=98=E5=8C=96=EF=BC=8C?= =?UTF-8?q?=E5=8E=BB=E9=99=A4=E9=81=97=E7=95=99=E7=9A=84jackson=E4=BB=A3?= =?UTF-8?q?=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/me/zhengjie/exception/handler/ApiError.java | 7 ++----- .../java/me/zhengjie/modules/system/domain/vo/MenuVo.java | 2 -- .../me/zhengjie/modules/system/service/dto/DeptDto.java | 2 -- eladmin-system/src/main/resources/config/application.yml | 2 -- 4 files changed, 2 insertions(+), 11 deletions(-) diff --git a/eladmin-common/src/main/java/me/zhengjie/exception/handler/ApiError.java b/eladmin-common/src/main/java/me/zhengjie/exception/handler/ApiError.java index 5112730b..977788c7 100644 --- a/eladmin-common/src/main/java/me/zhengjie/exception/handler/ApiError.java +++ b/eladmin-common/src/main/java/me/zhengjie/exception/handler/ApiError.java @@ -15,9 +15,7 @@ */ package me.zhengjie.exception.handler; -import com.fasterxml.jackson.annotation.JsonFormat; import lombok.Data; -import java.time.LocalDateTime; /** * @author Zheng Jie @@ -27,12 +25,11 @@ import java.time.LocalDateTime; class ApiError { private Integer status = 400; - @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") - private LocalDateTime timestamp; + private Long timestamp; private String message; private ApiError() { - timestamp = LocalDateTime.now(); + timestamp = System.currentTimeMillis(); } public static ApiError error(String message){ diff --git a/eladmin-system/src/main/java/me/zhengjie/modules/system/domain/vo/MenuVo.java b/eladmin-system/src/main/java/me/zhengjie/modules/system/domain/vo/MenuVo.java index 82fc0cc5..e1efa5a8 100644 --- a/eladmin-system/src/main/java/me/zhengjie/modules/system/domain/vo/MenuVo.java +++ b/eladmin-system/src/main/java/me/zhengjie/modules/system/domain/vo/MenuVo.java @@ -15,7 +15,6 @@ */ package me.zhengjie.modules.system.domain.vo; -import com.fasterxml.jackson.annotation.JsonInclude; import lombok.Data; import java.io.Serializable; import java.util.List; @@ -26,7 +25,6 @@ import java.util.List; * @date 2018-12-20 */ @Data -@JsonInclude(JsonInclude.Include.NON_EMPTY) public class MenuVo implements Serializable { private String name; diff --git a/eladmin-system/src/main/java/me/zhengjie/modules/system/service/dto/DeptDto.java b/eladmin-system/src/main/java/me/zhengjie/modules/system/service/dto/DeptDto.java index 4c3b12aa..bc236a11 100644 --- a/eladmin-system/src/main/java/me/zhengjie/modules/system/service/dto/DeptDto.java +++ b/eladmin-system/src/main/java/me/zhengjie/modules/system/service/dto/DeptDto.java @@ -15,7 +15,6 @@ */ package me.zhengjie.modules.system.service.dto; -import com.fasterxml.jackson.annotation.JsonInclude; import lombok.Getter; import lombok.Setter; import me.zhengjie.base.BaseDTO; @@ -39,7 +38,6 @@ public class DeptDto extends BaseDTO implements Serializable { private Integer deptSort; - @JsonInclude(JsonInclude.Include.NON_EMPTY) private List children; private Long pid; diff --git a/eladmin-system/src/main/resources/config/application.yml b/eladmin-system/src/main/resources/config/application.yml index 1d1f9747..5c172da6 100644 --- a/eladmin-system/src/main/resources/config/application.yml +++ b/eladmin-system/src/main/resources/config/application.yml @@ -8,8 +8,6 @@ spring: check-template-location: false profiles: active: dev - jackson: - time-zone: GMT+8 data: redis: repositories: