Mybatis 3.5.X的特性与BUG_apache mybatis 3.5.x-程序员宅基地

技术标签: Java  Druid  SQLFeatureNotSupportedException  Mybatis  

MyBatis 3.5.X

mybatis-3.5.0

MyBatis 3.5.0 requires Java 8 and later.

改善:

  • Avoid ‘Illegal reflective access’ warning on JDK 9+. #1156
  • Added Automatic-Module-Name : org.mybatis #1199 用于当 mybatis jar 在 Java 9 中被用作自动模块时,确保名称是 org.mybatis
  • Support java.util.Optional as return type of mapper method. #799 支持JDK8新特性Optional
  • Avoid unnecessary wasNull() calls from the built-in type handlers. #1244
  • It is now possible to specify columnPrefix in constructor arguments. #968
  • Improved reliability when searching constructor for auto-mapping. #1277
  • It is now possible to access private, package private and protected members in OGNL expressions. #1258
  • Throw exception if the specified keyProperty is not found when assigning generated keys. #1250
  • Added a type handler for SQLXML data type. #1221
  • Allow accessing private, package private and protected members in OGNL expression. #1258
  • <set /> tag now trims the leading comma. #21 指<set />标签可以自动修剪多余的前缀逗号
  • Infer <case /> tag’s resultType from the enclosing resultMap. #486
  • Allow specifying columnPrefix in constructor mapping. #968
  • Combination of @CacheNamespace and does not throw exception anymore. #1194
  • Support Log4J 2.6+. #1210
  • Slightly improved compatibility with drivers that only support JDBC 3 API. #1386
  • Upgraded testing framework to JUnit 5. #1425

Bug 修复:

  • OffsetDateTimeTypeHandler, OffsetTimeTypeHandler and ZonedDateTimeTypeHandler loses time zone information. #1081
  • Avoid SQLException when using Cursor with Db2. #1345
  • Avoid exception when using Cursor with ReuseExecutor. #1351
  • RowBounds with out-of-range offset causes SQLException on DB2. #1355
  • Specified logging implementation is not used in some classes. #1272
  • Unable to resolve javaType for . #1381
  • Deeply nested (3+ levels) result map could cause IllegalArgumentException. #1176
  • Generic type parameter is not correctly resolved when the class hierarchy is deeper than 3 levels. #1260

不向后兼容的改变(包括3.4.6版本及之前版本)

  • Specifying keyProperty is now mandatory when using useGeneratedKeys. If you relied on the implicit default value (=“id”), generated keys will be silently ignored. #1198
  • Using Cursor now requires a driver that supports JDBC 4.1 API. #1351
  • If you extended org.apache.ibatis.type.BaseTypeHandler, you might need to add wasNull() check in your type handler. #1144
  • The default resultSetType value has been changed from FORWARD_ONLY to UNSET. This is applied only to annotation based mappers (for XML based mappers, the default is/was UNSET). #1334
  • If you extended org.apache.ibatis.transaction.jdbc.JdbcTransaction for some reason, the property autoCommmit has been renamed to autoCommit. #941

mybatis-3.5.1

改善:

  • You can now return ‘script’ from a SQL provider. The returned script is parsed using the language driver specified by @Lang. #1391
  • You can now omit method attribute from SQL provider annotations when the provider method has the same name as the mapper method or its name is provideSql. #1279
  • You can now get databaseId in SQL providers. #1503
  • The default type handler for LONGVARCHAR is changed from ClobTypeHandler to StringTypeHandler. This improves compatibility with SAP ASE. #1484

Bug 修复:

  • keyProperty specified with parameter name could cause ExecutorException. #1485
  • False positive error ‘Ambiguous collection type …’ . #1472
  • EnumTypeHandler is not used when the enum has methods. #1489
  • Auto-mapping fails in a result map referenced from a constructor arg with columnPrefix. #1496
  • Constructor auto-mapping could fail when columnPrefix is specified in the parent result map. #1495
  • LocalTimeTypeHandler loses fractional seconds part. #1478
  • LocalDateTypeHandler and LocalDateTimeTypeHandler could return unexpected value. #1478 修复会导致SQLFeatureNotSupportedException的bug

不向后兼容的修改

  • Because of the fix for #1478 , LocalDateTypeHandler, LocalTimeTypeHandler and LocalDateTimeTypeHandler now require a JDBC driver that supports JDBC 4.2 API.
    Also, these type handlers no longer work with Druid. See #1516 由于Druid的1.1.17版本不支持JDBC 4.1及以上版本,所以LocalDate, LocalTime和数据库DATE之间转换会报SQLFeatureNotSupportedException异常。Druid的1.1.18版本会修复这个问题。
版权声明:本文为博主原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。
本文链接:https://blog.csdn.net/handsome_926/article/details/93861046

智能推荐

spring注解@ControllerAdvice的原理分析和使用_controlleradvice原理-程序员宅基地

文章浏览阅读1w次,点赞10次,收藏17次。@ControllerAdvice注解是Spring3.2中新增的注解,学名是Controller增强器,作用是给Controller控制器添加统一的操作或处理。对于@ControllerAdvice,我们比较熟知的用法是结合@ExceptionHandler用于全局异常的处理,但其作用不止于此。ControllerAdvice拆开来就是Controller Advice,关于Advice,在Spring的AOP中,是用来封装一个切面所有属性的,包括切入点和需要织入的切面逻辑。这里ControllerA_controlleradvice原理

改善侧滑菜单Fragment切换速度(解决Fragment切换加载慢的问题)_new fragment有点慢-程序员宅基地

文章浏览阅读3.9k次。1.现状:在做项目的时候很多时候需要使用侧滑菜单。侧滑菜单项一般都是用Fragment。一般设计上是在Home page的layout中使用FrameLayout 作为一个container 如:content_main.xml

在Google使用Borg进行大规模集群的管理 7-8-程序员宅基地

文章浏览阅读606次。为什么80%的码农都做不了架构师?>>> ..._google trace batch job

python加密字符串小写字母循环后错两位_python学习:实现将字符串进行加密-程序员宅基地

文章浏览阅读2.6k次,点赞3次,收藏3次。'''题目描述1、对输入的字符串进行加解密,并输出。2加密方法为:当内容是英文字母时则用该英文字母的后一个字母替换,同时字母变换大小写,如字母a时则替换为B;字母Z时则替换为a;当内容是数字时则把该数字加1,如0替换1,1替换2,9替换0;其他字符不做变化。s'''#-*-coding:utf-8-*-importre#判断是否是字母defisLetter(letter):iflen..._编写函数fun2实现字符串加密,加密规则为:如果是字母,将其进行大小写转换;如果

【Java容器源码】集合应用总结:迭代器&批量操作&线程安全问题_迭代器是否可以保证容器删除和修改安全操作-程序员宅基地

文章浏览阅读4.4k次,点赞6次,收藏8次。下面列出了所有集合的类图:每个接口做的事情非常明确,比如 Serializable,只负责序列化,Cloneable 只负责拷贝,Map 只负责定义 Map 的接口,整个图看起来虽然接口众多,但职责都很清晰;复杂功能通过接口的继承来实现,比如 ArrayList 通过实现了 Serializable、Cloneable、RandomAccess、AbstractList、List 等接口,从而拥有了序列化、拷贝、对数组各种操作定义等各种功能;上述类图只能看见继承的关系,组合的关系还看不出来,比如说_迭代器是否可以保证容器删除和修改安全操作

养老金融:编织中国老龄社会的金色安全网

在科技金融、绿色金融、普惠金融、养老金融、数字金融这“五篇大文章”中,养老金融以其独特的社会价值和深远影响,占据着不可或缺的地位。通过政策引导与市场机制的双重驱动,激发金融机构创新养老服务产品,如推出更多针对不同年龄层、风险偏好的个性化养老金融产品,不仅能提高金融服务的可获得性,还能增强民众对养老规划的主动参与度,从而逐步建立起适应中国国情、满足人民期待的养老金融服务体系。在人口老龄化的全球趋势下,中国养老金融的发展不仅仅是经济议题,更关乎社会的稳定与进步。养老金融:民生之需,国计之重。

随便推点

【强化学习 】Actor-Critic(AC)基于策略梯度的算法原理和实现案例方法-程序员宅基地

文章浏览阅读569次。作者:禅与计算机程序设计艺术 1.简介Actor-Critic(AC)是一种基于策略梯度的方法,在很多强化学习问题中都有着广泛的应用。它利用两个网络分别来评估状态值函数Q(s,a)和执行策略A(s)。Actor是一个确定性的策略网络,它根据状态S选择动作A。Critic是一个近似的状态价值函数,它给定

黑马程序员——字节流_黑马 字节流-程序员宅基地

文章浏览阅读378次。------- android培训、java培训、期待与您交流! ---------- IO流用来处理设备之间的数据传输Java对数据的操作是通过流的方式Java用于操作流的类都在IO包中流按流向分为两种:输入流,输出流。流按操作类型分为两种:字节流与字符流。 字节流可以操作任何数据,字符流只能操作纯字符数据,比较方便。 _黑马 字节流

专插本计算机专业报考人数,2019年专插本各专业报考录取人数、录取分数及平均分统计 (二)...-程序员宅基地

文章浏览阅读307次。原标题:2019年专插本各专业报考录取人数、录取分数及平均分统计 (二)华南师范大学2019年报考录取数据 华师2019年是突然新增的,所以很多考生没来得及准备,加上华师招的是职教师资专业,需要职教证书,并且有专业限制。所以报的人数不多。我们可以看到录取人数少于计划人数,自然是(被动的)过线就录了。2020年报考华师的人数多了(计划341人,网传报考人数1519.),因为职教师资省最低录取分是24..._计算机网络专业插本竞争比

Mybatis学习笔记(传智播客)(完结)_传智接口测试笔记-程序员宅基地

文章浏览阅读9.6k次,点赞24次,收藏113次。说明:本文由大量的源代码,及截图,建议读者,操作一遍。ide:IDEA。文末有笔记及视频分享Mybatis数据表的sql下载 密码: xjjw1、对原生态jdbc程序(单独使用jdbc开发)问题总结先来看一部分代码Public static void main(String[] args) { Connection connection ..._传智接口测试笔记

快排 python简洁版_快速排序的四种python实现(推荐)-程序员宅基地

文章浏览阅读119次。快速排序算法,简称快排,是最实用的排序算法,没有之一,各大语言标准库的排序函数也基本都是基于快排实现的。本文用python语言介绍四种不同的快排实现。1. 一行代码实现的简洁版本quick_sort = lambda array: array if len(array) <= 1 else quick_sort([item for item in array[1:] if item <...

设计模式六大原则(2):里氏替换原则-程序员宅基地

文章浏览阅读442次。设计模式六大原则(2):里氏替换原则 作者:zhengzhb 地址:http://www.uml.org.cn/sjms/201211023.asp#1 肯定有不少人跟我刚看到这项原则的时候一样,对这个原则的名字充满疑惑。其实原因就是这项原则最早是在1988年,由麻省理工学院的一位姓里的女士(Barbara Liskov)提出来的。定义1:如果对每一个类型为 T1的对象 o1,都有类型为 T2

推荐文章

热门文章

相关标签