@JsonFormat(pattern="yyyy-MM-dd",timezone = "GMT+8")

   pattern:是你需要转换的时间日期的格式

   timezone:是时间设置为东八区,避免时间在转换中有误差

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

总结: 

  注解@JsonFormat主要是后台到前台的时间格式的转换

  注解@DataFormAT主要是前后到后台的时间格式的转换

相关文章:

  • 2021-12-26
  • 2021-10-04
  • 2021-10-25
  • 2022-01-14
猜你喜欢
  • 2021-05-27
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-13
  • 2021-09-29
  • 2022-12-23
相关资源
相似解决方案