用AI赚第一桶💰低成本搭建一套AI赚钱工具,源码可二开。 广告
# Migrating from Abator This page details changes between MyBatis Generator (MBG) and Abator. For most users, the changes should be simple. If you extended any of Abator's classes to supply custom implementations of code generators or the Java type resolver, you will need to rework those custom classes. The changes are listed in three categories: from required configuration changes to less common changes. Note that most changes are described assuming you are using XML configuration for MBG. If you are using Java based configuration, then the changes are still required and should be easy to deduce from the description of the XML changes. ## Required for All Users * The DTD has changed. The new DOCTYPE should be ``` <!DOCTYPE generatorConfiguration PUBLIC "-//mybatis.org//DTD MyBatis Generator Configuration 1.0//EN" "http://mybatis.org/dtd/mybatis-generator-config_1_0.dtd"> ``` * The `<abatorConfiguration>` element is renamed to `<generatorConfiguration>` * The `<abatorContext>` element is renamed to `<context>` * The `<daoGenerator>` element is renamed to `<javaClientGenerator>` ## Required for Many Users * MyBatis3 is now the default target runtime. * `<context>` element now requires an ID * The `generatorSet` attribute is removed from the `<context>` element and replaced with the `targetRuntime` attribute. Valid values for this attribute are `Ibatis2Java2`, `Ibatis2Java5`, or `MyBatis3`. MBG does not include the legacy generator set from Abator - so iBATIS version 2.2.0 or higher is required for the code generated by MyBatis Generator. * The MBG classloading strategy has changed substantially, and we now recommend that you manage the runtime classpath external to MBG. If you manage the classpath with configuration entries, you must make the following changes from Abator: * Class path entries are specified at the configuration file level with the [<classPathEntry>](configreference/classPathEntry.html) element - now a child element of `<generatorConfiguration>` only. * A `<classPathEntry>` element is not longer allowed as a child of `<jdbcConnection>` * The "rootClasspath" property is no longer valid for the `<javaModelGenerator>` element. ## Rarely Required Changes * The `type` attribute is removed from both the `<javaModelGenerator>` and `<sqlMapGenerator>` elements. MBG has an entirely different method of supplying custom code generators than Abator. See the [Extending MyBatis Generator](reference/extending.html) page for full details. * The `JavaTypeResolver` interface has changed and is simplified. If you specified a custom implementation on the `<javaTypeResolver>` element, you must rework your implementation class. * The `ProgressCallback` interface has changed significantly. If you implemented this interface for some other execution environment, you will need to rework your implementation.