To get up and running quickly with Ibator, follow these steps:
<jdbcConnection>
element to specify how to connect to
the target database<javaModelGenerator>
element to specify target package
and target project for generated Java model objects<sqlMapGenerator>
element to specify target package
and target project for generated SQL map files<daoGenerator>
element to specify target package
and target project for generated DAO interfaces and classes (you may
omit the <daoGenerator>
element if you don't wish to generate DAOs)<table>
elementSee the XML Configuration File Reference page for an example of an Ibator configuration file.
java -jar ibator.jar -configfile \temp\ibatorConfig.xml -overwrite
This will tell Ibator to run using your configuration file. It will also tell Ibator
to overwrite any existing Java files with the same name. If you want to save any existing
Java files, then omit the -overwrite
parameter. If there is a conflict, Ibator
will save the newly generated file with a unique name (e.g. MyClass.java.1).
Important: Ibator generated code requires that statement namespaces are enabled in your iBATIS configuration. See the Tasks After Running Ibator page for more information.