在日期实体属性上加该注解:
/**
* 创建时间
*/
@JsonFormat(timezone = "GMT+8", shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss")
@Column(name = "create_time")
private Date createTime;
在日期实体属性上加该注解:
/**
* 创建时间
*/
@JsonFormat(timezone = "GMT+8", shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss")
@Column(name = "create_time")
private Date createTime;