I. Installing Plug-ins
Download Eclipse Plugin from http://ibatis.apache.org/abator.html. There are 2 ways to install a plugin.
1. Remote Installation.
Eclipse->help>software Updates>find and Install->search for new features to Install->
New Remote site (name:abator for Eclipse Update site, url:http://ibatis.apache.org/tools/abator)
->ok->abator for Eclipse Update Site->ok
2. Manual Installation.
http://ibatis.apache.org/abator.html download Abatorforeclipse1.1.0.zip, download and operate in eclipse
Eclipse->help>software Updates>find and Install->search for new features to Install (press "Next")->
New local site-> selection just download the file->ok
Two. Establishment of a project
Create a new Eclipse project, enter a name, then select File > New >abator for iBatis configuration file, select location, and type file Name:abatorCsonfig.xml.
Click "Finish" and Eclipse will create the Abatorcsonfig.xml file in the root directory of the program and edit it to read as follows:
<?xml version= "1.0" encoding= "UTF-8"?>
<! DOCTYPE abatorconfiguration Public "-//apache Software foundation//dtd abator for IBATIS Configuration 1.0//en" "http://i Batis.apache.org/dtd/abator-config_1_0.dtd ">
<abatorconfiguration >
<abatorcontext >
<jdbcconnection driverclass= "Driver" connectionurl= "Database url" userid= "username" password= "password" >
<classpathentry location= "Database-driven Jar pack"/>
</jdbcConnection>
<javamodelgenerator targetpackage= "model Layer package path" targetproject= "src path"/>
<sqlmapgenerator targetpackage= "Map Layer package path" targetproject= "src path"/>
<daogenerator targetpackage= "DAO Layer Package path" targetproject= "src path" type= "IBATIS"/>
<table schema= "table name" tablename= "table name" catalog= "database name" > must be written, or it will be an error.
</table>
</abatorContext>
</abatorConfiguration>
Click on the Abatorcsonfig.xml right mouse button, select Generate IBATIS artifact, in the SRC directory will generate model, map, DAO three directories, the file is also established.
Javamodelgenerator: We used to say Valueobject
Sqlmapgenerator:xml file
Daogenerator: Code to place Interfaces and DAO