当前位置:网站首页>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组件 配置就更简单了 只需要指定格式化的时间格式
注意这个日期格式 要跟后端一一对应哦
边栏推荐
- 2021-09-26
- Project cost management__ Cost management technology__ Article 7 completion performance index (tcpi)
- Fundamentals of Electronic Technology (III)__ Chapter 6 combinational logic circuit
- Assignment to '*' form incompatible pointer type 'linkstack' {aka '*'} problem solving
- [male nanny style] teach you to open the first wechat applet
- CEF download, compile project
- The third paper of information system project manager in soft examination
- Chromium Embedded Framework (CEF) 介绍
- 开学实验里要用到mysql,忘记基本的select语句怎么玩啦?补救来啦~
- 当你需要使用STM32某些功能,而51实现不了时, 那32自然不需要学
猜你喜欢
Getting started with JMX, MBean, mxbean, mbeanserver
[male nanny style] teach you to open the first wechat applet
Code word in NR
Flink learning notes (VIII) multi stream conversion
在三线城市、在县城,很难毕业就拿到10K
Idea remote breakpoint debugging jar package project
SSB Introduction (PbCH and DMRs need to be supplemented)
[combinatorics] Introduction to Combinatorics (combinatorial thought 2: mathematical induction | mathematical induction promotion | multiple induction thought)
没有多少人能够最终把自己的兴趣带到大学毕业上
Assignment to '*' form incompatible pointer type 'linkstack' {aka '*'} problem solving
随机推荐
[CSDN]C1训练题解析_第二部分_Web基础
没有多少人能够最终把自己的兴趣带到大学毕业上
STM32 serial communication principle
Project cost management__ Topic of comprehensive calculation
Error output redirection
2020-08-23
[keil5 debugging] warning:enumerated type mixed with other type
How does the nr-prach receiver detect the relationship between prembleid and Ta
单片机职业发展:能做下去的都成牛人了,熬不动就辞职或者改行了
要選擇那種語言為單片機編寫程序呢
2021-09-26
Process communication - semaphore
Code word in NR
Basic knowledge of MySQL database (an introduction to systematization)
MySQL Data Definition Language DDL common commands
Education is a pass and ticket. With it, you can step into a higher-level environment
Leetcode daily question (1024. video sticking)
Simple use of MySQL (addition, deletion, modification and query)
MySQL data manipulation language DML common commands
干单片机这一行的时候根本没想过这么多,只想着先挣钱养活自己