当前位置:网站首页>问题总结档案
问题总结档案
2022-07-28 10:08:00 【我那个果味】
问题一:使用SpringBoot 如何改变时间格式
使用@JsonFormat注解
public User {
...
@JsonFormat(pattern = "yyyy-MM-dd" timezone="GMT+8")
private Date createTime;
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private LocalDateTime updateTime;
...
}
JsonFormat注解可以帮助我们实现日期转化为指定格式的时间字符串pattern属性指定时间格式,timezone属性指定时区LocalDateTime不会产生时区问题;Date会产生时区问题,需要使用timezone进行指定
边栏推荐
猜你喜欢

初识SuperMap iDesktop
![[esp32][esp idf] esp32s3 quickly build lvglv7.9](/img/39/8efef047d0a9223b97819a54b5edf8.png)
[esp32][esp idf] esp32s3 quickly build lvglv7.9

软件设计师考前20问,注意啦!!

5、动态规划---斐波那契数列

Flink - checkpoint Failure reason: Not all required tasks are currently running

13 probability distributions that must be understood in deep learning

我用小程序容器让移动研发效率提升了5倍!

On July 13, 2021, we collapsed like this

【JS高级】js之函数、重载、匿名函数、作用域及作用域链_03

What kind of knowledge payment system functions are more conducive to the development of the platform and lecturers?
随机推荐
Leetcode076 -- the kth largest number in the array
[esp32][esp idf] ap+sta realizes wireless bridging and transferring WiFi signals
Continue to write the greatest work based on modelarts [play with Huawei cloud]
19. 删除链表的倒数第 N 个结点
Redis设计规范
Sort - quick sort (fast and slow pointer Implementation)
Etcd(高可用KV数据库)
ADVANCE.AI出海指南助力企业出海印尼,掌握东南亚市场半边天
MySQL架构原理
二维前缀和
Performance test of API gateway APIs IX in Google cloud T2a and T2D
Why should I take the first-class constructor examination? How high is the gold content of the first-class Constructor Certificate?
Pl/sql server syntax explanation
4.调整数组顺序使奇数位于偶数前面
Thinking and summary of technical personnel | R & D Efficiency
利用正则表达式从文件路径中匹配文件名
2022 uni app parsing token standard - use jsrsasign - climb the pit
LIBCMTD.lib
vc链接静态库的时候要注意的问题
发力大核、独显!英众科技2020十代酷睿独显产品发布