Skip to content

Commit

Permalink
代码优化,去除遗留的jackson代码
Browse files Browse the repository at this point in the history
  • Loading branch information
elunez committed Jul 5, 2023
1 parent 0557ffc commit fc49522
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -27,12 +25,11 @@
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){
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonInclude;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
Expand Down Expand Up @@ -52,7 +51,6 @@ public class Dept extends BaseEntity implements Serializable {
private Set<Role> roles;

@TableField(exist = false)
@JsonInclude(JsonInclude.Include.NON_EMPTY)
private List<Dept> children;

@ApiModelProperty(value = "排序")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -26,7 +25,6 @@
* @date 2018-12-20
*/
@Data
@JsonInclude(JsonInclude.Include.NON_EMPTY)
public class MenuVo implements Serializable {

private String name;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@ spring:
check-template-location: false
profiles:
active: dev
jackson:
time-zone: GMT+8
data:
redis:
repositories:
Expand Down

0 comments on commit fc49522

Please sign in to comment.