Jsonformat annotation solves the problem of time format in the front end of localdatetime

Annotation @ jsonformat is mainly the conversion of time format from background to foreground

Annotation @ dataformat is mainly the conversion of time format from front to back to background

@DateTimeFormat(pattern = "yyyy-MM-dd")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
private Date symstarttime;
 
@DateTimeFormat(pattern = "yyyy-MM-dd")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
private Date symendtime;

Read More: