使用ibatis

1.abator自动生成iBatis代码以及配置文件

一.安装插件Abator

Abator for Eclipse Update Site

This is the Abator for Eclipse update site. If you're not sure what Abator is, then see this page http://ibatis.apache.org/abator.html

If you've already installed a prior version of Abator for Eclipse, then simply run the Eclipse Install/Update tool and any new version will be found automatically.

If you've not already installed Abator, then you can use the built in Eclipse install support by following these steps:

  1. Take the "Help>Software Updates>Find and Install" Menu Option
  2. Select the "Search for new features to install" radio button, press "Next"
  3. Press the "New Remote Site" button
  4. Enter the following information: Name: Abator for Eclipse Update Site URL: http://ibatis.apache.org/tools/abator
  5. Press OK
  6. Check the box next to "Abator for Eclipse Update Site"
  7. Follow the remainder of the install wizard

3、插件完成后,建立一个项目ibatisTest,然后选择文件>新建>ABator for iBatis configuration File,默认文件名,点击“完成”。修改刚才的文件abatorConfig.xml,把里面的相关“?”根据自己的实际情况替换如下,我的是这样的。

<?xml version="1.0" encoding="UTF-8"?>
BR>   "http://ibatis.apache.org/dtd/abator-config_1_0.dtd">


        <!-- TODO: Add Database Connection Information --&gt
              connectionURL="jdbc:oracle:thin:@localhost:1521:orcl"
         userId="spell"
         password="spell">
      
    

    
    
    

    

  

5、  abatorConfig.xml上点击鼠标右键,选择Generate iBATIS Artifact,在src目录下会生成com.spell.model、com.spell.map、com.spell.dao三个目录,文件也建立好了。 其他有什么要修改的就自己动手吧~~

6

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/769808/viewspace-78771/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/769808/viewspace-78771/

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值