其他分享
首页 > 其他分享> > 格式化返回前端日期的时间格式

格式化返回前端日期的时间格式

作者:互联网

@JsonIgnoreProperties(ignoreUnknown = true),将这个注解写在类上之后,就会忽略类中不存在的字段。这个注解还可以指定要忽略的字段,例如@JsonIgnoreProperties({ “password”, “secretKey” })

@Transient
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value = "createTime", name = "开票时间")
private Date createTime;

标签:格式化,ss,pattern,前端,yyyy,HH,JsonIgnoreProperties,格式,dd
来源: https://blog.csdn.net/weixin_43729536/article/details/110119784