Migrating from Ibator

This page details changes between MyBatis Generator (MBG) and Ibator. For most users, the changes should be simple. If you extended any of Ibator's classes to supply custom implementations of code generators or the Java type resolver, you will need to rework those custom classes.

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.

重要提示: MBG will correctly parse older Ibator configuration files, so no change is actually required. However, new features will only be implemented in configuration files that conform to the MyBatis Generator DTD.

Required for Some 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">
        
  • MyBatis3 is now the default target runtime.
  • The <ibatorConfiguration> element is renamed to <generatorConfiguration>
  • The <ibatorContext> element is renamed to <context>
  • The <ibatorPlugin> element is renamed to <plugin>
  • The <daoGenerator> element is renamed to <javaClientGenerator>
  • If you implemented a plugin, the daoXXX methods have been renamed to clientXXX.