For the first contact, in the end how to start the use of abator, less resources, this article recorded the first time I use the process today, I hope that the same beginners to help.
1. Obtain
Http://ibatis.apache.org/abator.html
Eclipse can automate the update acquisition of this plugin, the official installation steps.
If you ' ve already installed a prior version of Abator, simply run the Eclipse install/update tool and the new version would be found automatically.
If you ' ve not already installed Abator, then can use the built in Eclipse install support by following these Steps:ta Ke the "help>software updates>find and Install" menu Option Select the "Search for new features to Install" Radio bu Tton, press "Next" "New Remote Site" button Enter the following information:Name:Abator for Eclipse Update Sit E Url:http://ibatis.apache.org/tools/abator Press OK Check the box next to "Abator for Eclipse Update Site" Follow the RE Mainder of the Install Wizard
2, after the installation will be in the new menu to see a novel file type Abator for IBATIS Configuration file, this is the Abator configuration file, configuration file details see Http://ibatis.apache.org/docs /tools/abator/
3, a new configuration file, to modify, according to their actual needs to modify
Key points:
1) Jdbcconnection, according to the general configuration can be explained that it needs to specify access to the Jdbcdriver classpathentry, for MSSQLServer, to the three jar files are included, Otherwise, there will be a JDBC access error.
2) Configure three Pakage
3 configuration table, which should be described here for MSSQLServer can not write Tableschema, I first specified Tableschema, the results did not find the corresponding table
The simple configuration is as follows, complicated by the detailed description of the configuration file. The sample configuration file is as follows
<abatorConfiguration>
<abatorContext> <!--todo:add Database Connection Information-->
<jdbcconnection driverclass= "Com.microsoft.jdbc.sqlserver.SQLServerDriver"
Connectionurl= "JDBC:MICROSOFT:SQLSERVER://LOCALHOST:1433;DATABASENAME=WHM; Selectmethod=cursor "
userid= "SA"
password= "SA" >
<classpathentry location= "C:/Program files/apache Software foundation/tomcat"/ >
<classpathentry location= "C:/Program files/apache Software foundation/tomcat" 5.0/common/lib/msutil.jar
<classpathentry location= "C:/Program files/apache Software foundation/tomcat" 5.0/common/lib/msbase.jar
</jdbcConnection>
<javamodelgenerator targetpackage= "Com.dwerp.itatis.domain" targetproject= "Bhbmanage"/>
<sqlmapgenerator targetpackage= "Com.dwerp.itatis.persistence.xml" targetproject= "Bhbmanage"/>
<daogenerator type= "IBATIS" targetpackage= "Com.dwerp.itatis.persistence.sqlmapdao" targetproject= "Bhbmanage"/ >
<table tablename= "Bhbgl" >
</table>
</abatorContext>
</abatorConfiguration>
4, right click the configuration file, click Generate IBatis artifacts, generate file.