当前位置:网站首页>2.Elment Ui 日期选择器 格式化问题
2.Elment Ui 日期选择器 格式化问题
2022-07-03 09:15:00 【look-word】
Elment Ui 日期选择器 格式化问题
在前后端联调过程中 我们常常会遇到日期无法被反序列化 这个问题 会有点头疼
下面以我这边为例 后端使用的是springboot 默认集成了jackjson 可以配置 就能实现序列化时间啦

.HttpMessageNotReadableException: JSON parse error: Cannot deserialize value of type `java.time.LocalDateTime` from String "2022-06-17 00:31:04": Failed to deserialize java.time.LocalDateTime: (java.time.format.DateTimeParseException) Text '2022-06-17 00:31:04' could not be parsed at index 10;
大概意思是 这个时间格式 无法被反序列化
解决办法
后端配置
很简单 在接收参数的属性上添加 @JsonFormat(pattern = “yyyy-MM-dd HH:mm:ss”)
大概意思是 可以反序列化的格式 是yyyy-MM-dd HH:mm:ss

前端

因为我们用的是 elmentui组件 配置就更简单了 只需要指定格式化的时间格式
注意这个日期格式 要跟后端一一对应哦

边栏推荐
- Happy Dragon Boat Festival—— Zongzi written by canvas~~~~~
- STM32 serial communication principle
- 干单片机这一行的时候根本没想过这么多,只想着先挣钱养活自己
- SCM career development: those who can continue to do it have become great people. If they can't endure it, they will resign or change their careers
- 2020-08-23
- MySQL的简单使用(增删改查)
- Programming ideas are more important than anything, not more than who can use several functions, but more than the understanding of the program
- Quelle langue choisir pour programmer un micro - ordinateur à puce unique
- Nodemcu-esp8266 development (vscode+platformio+arduino framework): Part 3 --blinker_ MIOT_ Light (lighting technology app control + Xiaoai classmate control)
- 单片机现在可谓是铺天盖地,种类繁多,让开发者们应接不暇
猜你喜欢

You need to use MySQL in the opening experiment. How can you forget the basic select statement? Remedy is coming~

UCI and data multiplexing are transmitted on Pusch - Part I

内存数据库究竟是如何发挥内存优势的?

Gpiof6, 7, 8 configuration
![顺利毕业[2]-学生健康管理系统 功能开发中。。。](/img/91/72cdea3eb3f61315595330d2c9016d.png)
顺利毕业[2]-学生健康管理系统 功能开发中。。。

Difference of EOF

嵌入式系统没有特别明确的定义

GPIO port details, Hal library operation keys

Matlab reads hexadecimal numbers and converts them into signed short

IDEA远程断点调试jar包项目
随机推荐
单片机现在可谓是铺天盖地,种类繁多,让开发者们应接不暇
Electronic product design
STM32 interrupt priority management
How does the nr-prach receiver detect the relationship between prembleid and Ta
numpy. Reshape() and resize() functions
【22毕业季】我是毕业生yo~
PIP references domestic sources
MYSQL数据库底层基础专栏
PRACH --- originator
编程思想比任何都重要,不是比谁多会用几个函数而是比程序的理解
UCI and data multiplexing are transmitted on Pusch - placement of data and UCI positions (Part III)
The cyclic shift of PUCCH in NR channel is generated by MATLAB
Leetcode daily question (2090. K radius subarray averages)
SCM career development: those who can continue to do it have become great people. If they can't endure it, they will resign or change their careers
Leetcode daily question (2212. maximum points in an archery competition)
Gpiof6, 7, 8 configuration
Leetcode daily question (2109. adding spaces to a string)
2020-08-23
[keil5 debugging] warning:enumerated type mixed with other type
IDEA远程断点调试jar包项目