@ApiModelProperty(value = "创建时间")
@JSONField(format = "yyyy-MM-dd HH:mm:ss")
private LocalDateTime createTime;
返回的结果
"createTime": "2022-07-04T15:09:36"
修改:
@ApiModelProperty(value = "创建时间")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
private LocalDateTime createTime;
结果:
"createTime": "2022-07-04 15:09:36"