标签:form bsp yml vat ndt jackson div app ack
1.局部转换
@JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8",locale = "zh") private Date endTime;
2.全局转换 springboot在application.yml配置文件中文件中加入以下
spring:
jackson:
date-format: yyyy-MM-dd
time-zone: GMT+8
或者在application.poperties文件中加入
spring.jackson.date-format=yyyy-MM-dd
spring.jackson.date-format=time-zone: GMT+8
标签:form bsp yml vat ndt jackson div app ack
原文地址:https://www.cnblogs.com/wanghy898/p/11100543.html