当前位置:网站首页>DateTimeFormat放到@RequestBody下是无效的
DateTimeFormat放到@RequestBody下是无效的
2022-06-25 03:32:00 【MakeGreatEffort】
一般都是使用
@DateTimeFormat把 传给后台的时间字符串转成Date ,
@JsonFormat 把后台传出的Date转成时间字符串 ,
@DateTimeFormat只会在类似@RequestParam的请求参数(url拼接的参数才生效,如果是放到RequestBody中的form-data也是无效的)上生效,
@DateTimeFormat放到@RequestBody下是无效的。
@RequestBody中则可以使用@JsonFormat把传给后台的时间字符串转成Date;
也就是说 @JsonFormat其实既可以把传给后台的时间字符串转成Date也可以把后台传出的Date转成时间字符串 。
边栏推荐
- Insurance can also be bought together? Four risks that individuals can pool enough people to buy Medical Insurance in groups
- Add in cmakelists_ Definitions() function
- PSQL column to row
- What if Alipay is controlled by risk for 7 days? Payment solution
- 20 years ICPC Macau station L - random permutation
- 微信小程序获取扫描二维码后携带的参数
- 高数 | 精通中值定理 解题套路汇总
- Please check the list of commonly used software testing tools.
- leecode学习笔记-机器人走到终点的最短路径
- Introduction to CUDA Programming minimalist tutorial
猜你喜欢

Rebeco:使用机器学习预测股票崩盘风险

EasyNVR使用Onvif探测设备失败,显示“无数据”是什么原因?

Getting started with unityshader Essentials - PBS physics based rendering

使用ShaderGraph制作边缘融合粒子Shader的启示

Single case of hungry and lazy mode

Seata四大模式之TCC模式详解及代码实现

Xiaomi routing R4A Gigabit version installation feed+openwrt tutorial (the full script does not need to be hard modified)

Getting started with unityshader - Surface Shader

Expressing the transformation of two coordinate systems with vectors

Advanced mathematics | proficient in mean value theorem problem solving routines summary
随机推荐
Summary of stack frame in arm assembly
What if Alipay is controlled by risk for 7 days? Payment solution
Once beego failed to find bee after passing the go get command Exe's pit
New solution of 202112-2 sequence query
The Oracle 11g RAC cluster database cannot be started due to directory permission errors
Add in cmakelists_ Definitions() function
計網 | 【四 網絡層】知識點及例題
Overview of AOSP ~ WiFi architecture
微信小程序获取扫描二维码后携带的参数
保险也能拼购?个人可以凑够人数组团购买医疗保险的4大风险
The era of copilot free is over! Student party and defenders of popular open source projects can prostitute for nothing
怎么开户打新债 开户是安全的吗
EasyNVR使用Onvif探测设备失败,显示“无数据”是什么原因?
软件测试周刊(第77期):只要放弃一次,就会滋生放弃的习性, 原本可以解决的问题也会变得无法解决。
MCN institutions are blooming everywhere: bloggers and authors should sign contracts carefully, and the industry is very deep
MySql安裝教程
How transformers Roberta adds tokens
Insurance app aging service evaluation analysis 2022 issue 06
ACM. Hj70 matrix multiplication calculation amount estimation ●●
Introduction to database system