Bean 参数时间 设置

@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") // 写入数据库时格式化
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") // 出参格式化
private LocalDateTime startTime;
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private LocalDateTime endTime;
posted @ 2021-07-23 17:51  马云12314  阅读(98)  评论(0编辑  收藏  举报