Abator_Eclipse下Ibatis代码生成工具

使用Abator工具来自动生成iBatis代码:

1.安装

  1.1.下载安装 

       首先,下载Abator插件,其Abator下载地址为: http://people.apache.org/builds/ibatis/alpha/AbatorForEclipse1.0.0.zip

       其次,将插件使用link方式将其安装到Eclipse中,也可以进行Find And Install来本地安装.

  2.1.Eclipse在线安装

       2.1.1. 要求eclipse3.3,jdk1.4以上

       2.1.2.eclipse菜单栏 --> help --> Software Updates --> Find And Install... ,

               在弹出的对话框中选择 “Search for new features to install” 然后点击 “next”,

               在对话框中点击按钮 New Remort Site... ,Name:Ibatis_Abator(任意),URL:http://ibatis.apache.org/tools/abator

               点击Finish,安装插件,然后重新启动eclipse.

               安装完成后,File-->new菜单下出现"Abator for iBATIS Configuration File"选项.

2.使用

 2.1.新建一个java工程.

   2.2.在eclipse菜单栏中新建一个abator 配置文件: File -->new--> Abator for iBATIS Configuration File

   2.3.打开abator生成的配置文件(abatorConfig.xml)并修改

 2.4.右键菜单选择Generate iBATIS Artifacts,生成文件


配置文件说明:


例:

<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE abatorConfiguration PUBLIC "-//Apache Software Foundation//DTD Abator for iBATIS Configuration 1.0//EN" "http://ibatis.apache.org/dtd/abator-config_1_0.dtd" >
<abatorConfiguration >
  <abatorContext generatorSet="Java5">
    <jdbcConnection driverClass="oracle.jdbc.driver.OracleDriver"
                    connectionURL="jdbc:oracle:thin:eric/eric@192.168.1.138:1521:PDORCL"
                    userId="root"
                    password="root" >
    <classPathEntry location="D:/workspace/Ibatis_Abator/lib/ojdbc14.jar" />
    </jdbcConnection>
    <javaModelGenerator targetPackage="com.bean" targetProject="Ibatis_Abator" />
    <sqlMapGenerator targetPackage="com.bean" targetProject="Ibatis_Abator" />
    <daoGenerator targetPackage="com.bean" targetProject="Ibatis_Abator" type="SPRING" />
    <table schema="" tableName="T_AFN_0C_F1" ></table>
    <table schema="" tableName="T_AFN_0C_F100" ></table>
  </abatorContext>
</abatorConfiguration>

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值