To get up and running quickly with Abator, 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 Abator configuration file.
java -jar abator.jar -configfile \temp\abatorConfig.xml -overwrite
This will tell Abator to run using your configuration file. It will also tell Abator
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, Abator
will save the newly generated file with a unique name (e.g. MyClass.java.1).
Important: Abator generated code requires that statement namespaces are enabled in your iBATIS configuration. See the Tasks After Running Abator page for more information.