LocalDateTime format time

============================================ When the response type is LocalDateTime:
LocalDateTime will have a "T" in the middle when getting the date and time,
For example:  2020-04-17T17: 39: 07
If you don't want this format when responding, you can modify it by annotating @JsonFormt on the property
Such as:
@JsonFormt (pattern = "yyyy-MM-dd HH: mm: ss") // Format LocalDateTime
@JsonProperty (value = "CreateTime") // Capitalize the first letter of the response field
private LocalDateTime createTime;
 
=========================================
 

Guess you like

Origin www.cnblogs.com/qycq-fwy/p/12722071.html