iBatis to MyBatis migration efforts?
我在生产应用程序中使用的是iBatis-2.3.4.726。我想迁移生产应用程序以使用MyBatis。
在迁移过程中我需要考虑哪些要点?
是否有任何配置更改或MyBatis支持iBatis配置作为不建议使用的命令?
在使用Satish提到的迁移指南之前,请确保您已阅读所有注释,尤其是最后一个列出了使用转换器后必须手动完成哪些更改的注释:
is deprecated in mybatis. Converter is changing this to . This will create problems where we need result set from procedure call. So manually updated with . - Dynamic query part mentioned inside
tag are not converted by tool - Both
# and$ can be escaped by doubling in iBatis. This is not required in mybatis.typeAlias should be defined insql-map-config instead of mapper itself.- When result map with
groupBy changed into mybatis style usingcollection ,id property is not set properly by the converter.jdbcType="INT" is not recognized in mybatis. Updated to"INTEGER" nullValue inresultMap deprecated, we need to update query withISNULL expression.
我要添加的是,转换器似乎删除了iBatis中
迁移过程非常简单,我从这里得到了答案
希望这对您也有帮助。
Github上有一个工具,需要完成三个步骤。
笔记转换可能会失败!我收到类似这样的消息:对不起,我不能在哪里迁移
有关更多详细信息,请参见控制台输出。
希望这会有所帮助