当前位置:网站首页>确诊了!是Druid1.1.20的锅,查询无法映射LocalDateTime类型(带源码解析及解决方案)
确诊了!是Druid1.1.20的锅,查询无法映射LocalDateTime类型(带源码解析及解决方案)
2022-08-10 22:22:00 【天然玩家】
1 缘起
最近梳理MySQL增删改查实现方式过程中,发现不同的工具对MySQL操作方式差异较大,
MyBatis是比较成熟的ORM框架,使用方便,查询数据时自动映射数据,
Java sql原生操作则需要手动获取数据(映射数据),更加底层,
而SpringBoot(自测项目)中则是通过Druid和MyBatis操作MySQL,
自测查询LocalDateTime类型数据时,
Java原生和单独使用MyBatis(3.5.5)可正常映射,
使用Druid1.1.20和MyBatis3.5.5组合时,查询时无法正常映射LocalDateTime数据,
通过异常日志和Druid1.1.20源码,发现,是Druid1.1.20的锅,与MyBatis3.5.5无关,
因为MyBatis3.5.5已支持处理LocalDateTime类型数据,
特将造成异常的原因以及解决方案分享如下,帮助读者知其然,知其所以然。
2 场景复现
2.1 表结构
属性created_time和updated_time格式为datetime,完整的属性如下图所示。
2.2 映射
边栏推荐
- 过滤器
- 特别的三杯鸡
- LeetCode每日两题01:反转字符串 (均1200道)方法:双指针
- MySQL Advanced Commands
- make & cmake
- 2022年8月的10篇论文推荐
- y93.第六章 微服务、服务网格及Envoy实战 -- Envoy配置(四)
- Distribution Network Expansion Planning: Consider Decisions Using Probabilistic Energy Production and Consumption Profiles (Matlab Code Implementation)
- TCP连接过程中如果拔掉网线会发生什么?
- shell脚本
猜你喜欢

虚拟地址空间
![68: Chapter 6: Develop article services: 1: Content sorting; article table introduction; creating [article] article services;](/img/95/7f21ecda19030c2faecbe373893d66.png)
68: Chapter 6: Develop article services: 1: Content sorting; article table introduction; creating [article] article services;

Leave a message with a prize | OpenBMB x Tsinghua University NLP: The update of the large model open class is complete!

How to be a Righteous Hacker?What should you study?

高通平台开发系列讲解(应用篇)QCMAP应用框架介绍

Pro-test is effective | A method to deal with missing features of risk control data

金山云CEO王育林离职:正值冲刺港股之际 雷军曾送金砖

学会开会|成为有连接感组织的重要技能

BM13判断一个链表是否为回文结构

Qualcomm Platform Development Series Explanation (Application) Introduction to QCMAP Application Framework
随机推荐
Service - DNS forward and reverse domain name resolution service
元宇宙社交应用,靠什么吸引用户「为爱发电」?
"DevOps Night Talk" - Pilot - Introduction to CNCF Open Source DevOps Project DevStream - feat. PMC member Hu Tao
RK3399 platform development series explanation (kernel-driven peripherals) 6.35, IAM20680 gyroscope introduction
RK3399平台开发系列讲解(内核驱动外设篇)6.35、IAM20680陀螺仪介绍
web项目访问引用jar内部的静态资源
LeetCode Daily 2 Questions 02: Reverse the words in a string (1200 each)
Research on multi-element N-k fault model of power system based on AC power flow (implemented by Matlab code) [Power System Fault]
Glide监听Activity生命周期源码分析
合并k个已排序的链表
测试4年感觉和1、2年时没什么不同?这和应届生有什么区别?
水果沙拉酱
Black cats take you learn Makefile article 13: a Makefile collection compile problem
Why general company will say "go back messages such as" after the end of the interview, rather than just tell the interviewer the result?
August 10, 2022: Building Web Applications for Beginners with ASP.NET Core -- Creating Web UIs with ASP.NET Core
How many threads does LabVIEW allocate?
MySQL:MySQL的集群——主从复制的原理和配置
QT笔记——QT工具uic,rcc,moc,qmake的使用和介绍
uni-app微信小程序——下拉多选框
leetcode:355. 设计推特