当前位置:网站首页>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组件 配置就更简单了 只需要指定格式化的时间格式
注意这个日期格式 要跟后端一一对应哦
边栏推荐
- SSB Introduction (PbCH and DMRs need to be supplemented)
- Process communication - semaphore
- The third paper of information system project manager in soft examination
- 在三线城市、在县城,很难毕业就拿到10K
- MySQL 数据库基础知识(系统化一篇入门)
- 当你需要使用STM32某些功能,而51实现不了时, 那32自然不需要学
- Definition and use of enum in C language
- Getting started with shell programming
- [combinatorics] Introduction to Combinatorics (combinatorial thought 2: mathematical induction | mathematical induction promotion | multiple induction thought)
- Project cost management__ Cost management technology__ Article 8 performance review
猜你喜欢
Gpiof6, 7, 8 configuration
Idea remote breakpoint debugging jar package project
[graduation successful] [1] - tour [Student Management Information System]
Project cost management__ Cost management technology__ Article 6 prediction
An executable binary file contains more than machine instructions
单片机职业发展:能做下去的都成牛人了,熬不动就辞职或者改行了
编程思想比任何都重要,不是比谁多会用几个函数而是比程序的理解
Runtime.getRuntime().gc() 和 Runtime.getRuntime().runFinalization() 的区别
MySQL Data Definition Language DDL common commands
顺利毕业[2]-学生健康管理系统 功能开发中。。。
随机推荐
UCI and data multiplexing are transmitted on Pusch - placement of data and UCI positions (Part III)
Quelle langue choisir pour programmer un micro - ordinateur à puce unique
Happy Dragon Boat Festival—— Zongzi written by canvas~~~~~
Programming ideas are more important than anything, not more than who can use several functions, but more than the understanding of the program
我想各位朋友都应该知道学习的基本规律就是:从易到难
Nodemcu-esp8266 development (vscode+platformio+arduino framework): Part 5 --blinker_ MIOT_ MULTI_ Outside (lighting technology app + Xiaoai classmate control socket multiple jacks)
万字手撕七大排序(代码+动图演示)
Intelligent home design and development
Implementing distributed lock with redis
Synchronization control between tasks
要選擇那種語言為單片機編寫程序呢
Gpiof6, 7, 8 configuration
Leetcode daily question (985. sum of even numbers after queries)
Characteristics of PUCCH formats
Vector processor 9_ Basic multilevel interconnection network
Idea remote breakpoint debugging jar package project
【男保姆式】教你打开第一个微信小程序
Oracle database SQL statement execution plan, statement tracking and optimization instance
Leetcode daily question (2212. maximum points in an archery competition)
单片机职业发展:能做下去的都成牛人了,熬不动就辞职或者改行了