posts - 11,  comments - 28,  trackbacks - 0
          對(duì)初接觸者來說,到底如何開始使用abator,資源比較少,本文記載了我今日初次使用的過程,希望對(duì)和我一樣的初學(xué)者有所幫助

          獲得
          ????? http://ibatis.apache.org/abator.html
          ???? Eclipse可以自動(dòng)的進(jìn)行Update獲取此Plugin,官方的安裝步驟

          Automatic Eclipse Install

          If you've already installed a prior version of Abator, simply run the Eclipse Install/Update tool and the 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

          2、安裝好后將在New菜單中看到一個(gè)新的文件類型Abator for iBATIS Configuration File,此是Abator的配置文件,配置文件的詳細(xì)說明見http://ibatis.apache.org/docs/tools/abator/

          3、新建一個(gè)配置文件,進(jìn)行修改,根據(jù)自己的實(shí)際需求進(jìn)行修改
          關(guān)鍵點(diǎn):
          1)jdbcconnection,按照一般的配置即可,需要說明的是它需要指定訪問JdbcDriver的classPathEntry,對(duì)于MsSqlServer而言,要將這三個(gè)jar文件均包含在內(nèi),否則會(huì)出現(xiàn)jdbc訪問錯(cuò)誤。
          2)配置三個(gè)Pakage
          3)配置表,此處需說明的是對(duì)于MsSqlServer不能寫TableSchema,我初次指定TableSchema,結(jié)果未找到對(duì)應(yīng)的表
          簡(jiǎn)單的配置如下,復(fù)雜的見配置文件的詳細(xì)說明。示例配置文件如下
          <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 5.0/common/lib/mssqlserver.jar" />
          ????? <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、右鍵單擊配置文件,點(diǎn)擊Generate iBatis Artifacts,生成文件。

          ?

          posted on 2007-01-11 21:37 滌生 閱讀(2020) 評(píng)論(1)  編輯  收藏


          FeedBack:
          # re: 如何在Eclipse中使用ibatis的自動(dòng)代碼生成工具Abator
          2008-12-17 15:23 | 墻頭草

          只有注冊(cè)用戶登錄后才能發(fā)表評(píng)論。


          網(wǎng)站導(dǎo)航:
           
          <2007年1月>
          31123456
          78910111213
          14151617181920
          21222324252627
          28293031123
          45678910

          常用鏈接

          留言簿(5)

          隨筆檔案

          UML

          搜索

          •  

          最新評(píng)論

          閱讀排行榜

          評(píng)論排行榜

          主站蜘蛛池模板: 华安县| 延吉市| 安塞县| 油尖旺区| 锡林浩特市| 南通市| 嘉祥县| 兴隆县| 同仁县| 新源县| 招远市| 邳州市| 合川市| 新乡市| 吉木萨尔县| 自贡市| 昭觉县| 盐津县| 防城港市| 泽州县| 界首市| 内乡县| 凤庆县| 山丹县| 辉南县| 沈阳市| 砚山县| 广元市| 五指山市| 赤水市| 九龙坡区| 九江县| 云林县| 西贡区| 随州市| 霍邱县| 汾西县| 紫金县| 南汇区| 景洪市| 淮北市|