這篇文章主要介紹“ibatis插件的安裝方法”,在日常操作中,相信很多人在ibatis插件的安裝方法問題上存在疑惑,小編查閱了各式資料,整理出簡(jiǎn)單好用的操作方法,希望對(duì)大家解答”ibatis插件的安裝方法”的疑惑有所幫助!接下來,請(qǐng)跟著小編一起來學(xué)習(xí)吧!
創(chuàng)新互聯(lián)專注為客戶提供全方位的互聯(lián)網(wǎng)綜合服務(wù),包含不限于成都網(wǎng)站設(shè)計(jì)、網(wǎng)站建設(shè)、外貿(mào)網(wǎng)站建設(shè)、臨渭區(qū)網(wǎng)絡(luò)推廣、成都微信小程序、臨渭區(qū)網(wǎng)絡(luò)營(yíng)銷、臨渭區(qū)企業(yè)策劃、臨渭區(qū)品牌公關(guān)、搜索引擎seo、人物專訪、企業(yè)宣傳片、企業(yè)代運(yùn)營(yíng)等,從售前售中售后,我們都將竭誠(chéng)為您服務(wù),您的肯定,是我們最大的嘉獎(jiǎng);創(chuàng)新互聯(lián)為所有大學(xué)生創(chuàng)業(yè)者提供臨渭區(qū)建站搭建服務(wù),24小時(shí)服務(wù)熱線:13518219792,官方網(wǎng)址:www.chinadenli.net
安裝ibatis插件的方法其實(shí)很簡(jiǎn)單,請(qǐng)按照如下的步驟安裝ibatis插件。
一.安裝ibatis插件
從http://ibatis.apache.org/abator.html下載Eclipse Plugin。插件一共有2種安裝方式.
1.遠(yuǎn)程安裝ibatis插件.
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.手動(dòng)安裝ibatis插件.
http://ibatis.apache.org/abator.html下載AbatorForEclipse1.1.0.zip,下載后在eclipse中進(jìn)行ibatis插件安裝操作。
eclipse->Help>Software Updates>Find and Install->Search for new features to install(press "Next" )->
New Local Site->選種剛才下載的文件->OK
二.建立一個(gè)項(xiàng)目
新建一個(gè)Eclipse項(xiàng)目,輸入名字,然后選擇文件>新建>ABator for iBatis configuration File,選擇Location,并且鍵入File Name:abatorCsonfig.xml。
點(diǎn)擊“完成”,Eclipse會(huì)在程序根目錄下建立abatorCsonfig.xml文件,打開編輯它,內(nèi)容如下:
<?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>
<jdbcConnection driverClass="驅(qū)動(dòng)" connectionURL="數(shù)據(jù)庫URL" userId="用戶名" password="密碼">
<classPathEntry location="數(shù)據(jù)庫驅(qū)動(dòng)jar包" />
</jdbcConnection>
<javaModelGenerator targetPackage="model層包路徑" targetProject="src路徑" />
<sqlMapGenerator targetPackage="map層包路徑" targetProject="src路徑" />
<daoGenerator targetPackage="dao層包路徑" targetProject="src路徑" type="IBATIS" />
<table schema="表名" tableName="表名" catalog="數(shù)據(jù)庫名">一定要寫上,不然會(huì)報(bào)錯(cuò)的。
</table>
</abatorContext>
</abatorConfiguration>
在abatorCsonfig.xml上點(diǎn)擊鼠標(biāo)右鍵,選擇Generate iBATIS Artifact,在src目錄下會(huì)生成model、map、dao三個(gè)目錄,文件也建立好了。
javaModelGenerator:我們常說的ValueObject
sqlMapGenerator:XML文件
daoGenerator:放置接口和DAO的代碼
這樣一來,ibatis插件就被順利的安裝上了。
到此,關(guān)于“ibatis插件的安裝方法”的學(xué)習(xí)就結(jié)束了,希望能夠解決大家的疑惑。理論與實(shí)踐的搭配能更好的幫助大家學(xué)習(xí),快去試試吧!若想繼續(xù)學(xué)習(xí)更多相關(guān)知識(shí),請(qǐng)繼續(xù)關(guān)注創(chuàng)新互聯(lián)網(wǎng)站,小編會(huì)繼續(xù)努力為大家?guī)砀鄬?shí)用的文章!
本文標(biāo)題:ibatis插件的安裝方法
鏈接地址:http://www.chinadenli.net/article8/ppjdop.html
成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供App設(shè)計(jì)、標(biāo)簽優(yōu)化、網(wǎng)站設(shè)計(jì)、微信小程序、定制網(wǎng)站、動(dòng)態(tài)網(wǎng)站
聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請(qǐng)盡快告知,我們將會(huì)在第一時(shí)間刪除。文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如需處理請(qǐng)聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時(shí)需注明來源: 創(chuàng)新互聯(lián)