当前位置:网站首页>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转成时间字符串 。
边栏推荐
- C#实现水晶报表绑定数据并实现打印
- C # realizes crystal report binding data and printing
- 202112-2 序列查询新解
- Migrate Oracle database from windows system to Linux Oracle RAC cluster environment (1) -- migrate data to node 1
- The Oracle 11g RAC cluster database cannot be started due to directory permission errors
- The era of copilot free is over! Student party and defenders of popular open source projects can prostitute for nothing
- 电脑端微信用户图片DAT格式解码为图片(TK版)
- Distributed transaction solutions and code implementation
- Migrate Oracle database from windows system to Linux Oracle RAC cluster environment (3) -- set the database to archive mode
- 同花顺证券开户是安全的吗?
猜你喜欢

Use xxl-job to customize tasks and schedule them

Before the age of 36, Amazon transgender hackers were sentenced to 20 years' imprisonment for stealing data from more than 100million people!

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

Getting started with unityshader Essentials - PBS physics based rendering

MySQL根据表前缀批量修改、删除表

Computer wechat user picture decoded into picture in DAT format (TK version)

Detailed explanation of cache (for the postgraduate entrance examination of XD)

支付宝被风控7天怎么办?付解决方案

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

How transformers Roberta adds tokens
随机推荐
保险也能拼购?个人可以凑够人数组团购买医疗保险的4大风险
JS regular matching numbers, upper and lower case letters, underscores, midlines and dots [easy to understand]
Network planning | [four network layers] knowledge points and examples
Two way combination of business and technology to build a bank data security management system
PE file infrastructure sorting
在Microsoft Exchange Server 2007中安装SSL证书的教程
ACM. HJ75 公共子串计算 ●●
Egg 服务搭建微信公众号的基础服务
Error log format and precautions
計網 | 【四 網絡層】知識點及例題
Unity存档系统——Json格式的文件
网上开户股票安全吗?怎么开户呢?
How to click DOM to automatically locate the corresponding code line in vscode
AI clothing generation helps you complete the last step of clothing design
Charles packet capturing tool
How transformers Roberta adds tokens
automated testing
The era of copilot free is over! Student party and defenders of popular open source projects can prostitute for nothing
Leecode learning notes - the shortest path for a robot to reach its destination
Insurance can also be bought together? Four risks that individuals can pool enough people to buy Medical Insurance in groups