第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號(hào)安全,請(qǐng)及時(shí)綁定郵箱和手機(jī)立即綁定

myeclipse怎么自動(dòng)生成

myeclipse10沒(méi)法安裝hibernate tool也沒(méi)法自動(dòng)生成hbm.xml

正在回答

3 回答

我的myeclipse運(yùn)行成功了,

1.首先連接數(shù)據(jù)庫(kù),在myeclipse的右上角沒(méi)有模糊的按鈕

http://img1.sycdn.imooc.com//59a40aca000125c504180176.jpg

2.選擇myeclipse DataBase Explorer

http://img1.sycdn.imooc.com//59a40aef0001fa7504130293.jpg

3.在空白處點(diǎn)擊右鍵點(diǎn)擊new按鈕

http://img1.sycdn.imooc.com//59a40b180001cc8b03600626.jpg

4.如下圖,自己配置好。

http://img1.sycdn.imooc.com//59a40b5a000197d605230657.jpg

5.按下圖,直接點(diǎn)擊next。

http://img1.sycdn.imooc.com//59a40b8e00011fa606000679.jpg

6.按下圖,再次點(diǎn)擊next。

http://img1.sycdn.imooc.com//59a40bb30001ba4d05910667.jpg

7.點(diǎn)擊finish。

http://img1.sycdn.imooc.com//59a40be00001a7b305860667.jpg

然后生成了Students.hbm.xml文件。

最后按下面修改一下自動(dòng)生成的Students.hbm.xml,修改成如下的代碼:

<hibernate-mapping>

? ? <class name="Students" table="students" catalog="hibernate">

? ? ? ? <composite-id>

? ? ? ? ? ? <key-property name="sid" type="java.lang.Integer">

? ? ? ? ? ? ? ? <column name="sid" />

? ? ? ? ? ? </key-property>

? ? ? ? ? ? <key-property name="sname" type="java.lang.String">

? ? ? ? ? ? ? ? <column name="sname" length="20" />

? ? ? ? ? ? </key-property>

? ? ? ? ? ? <key-property name="gender" type="java.lang.String">

? ? ? ? ? ? ? ? <column name="gender" length="2" />

? ? ? ? ? ? </key-property>

? ? ? ? ? ? <key-property name="birthday" type="java.sql.Timestamp">

? ? ? ? ? ? ? ? <column name="birthday" length="19" />

? ? ? ? ? ? </key-property>

? ? ? ? ? ? <key-property name="address" type="java.lang.String">

? ? ? ? ? ? ? ? <column name="address" length="100" />

? ? ? ? ? ? </key-property>

? ? ? ? </composite-id>

? ? </class>

</hibernate-mapping>

最后,一旦 自動(dòng)生成了Students.hbm.xml,,,hibernate.cfg.xml會(huì)自動(dòng)添加這行代碼

<mapping resource="./Students.hbm.xml" />


0 回復(fù) 有任何疑惑可以回復(fù)我~
#1

WOshows 提問(wèn)者

非常感謝!
2017-09-04 回復(fù) 有任何疑惑可以回復(fù)我~

下載tool沒(méi)成功


0 回復(fù) 有任何疑惑可以回復(fù)我~

下載好hibernate組件,然后點(diǎn)eclipse 里的help,----install newsoftware,---add ? 然后選擇location 和name,next ,next , finish.就完成了

0 回復(fù) 有任何疑惑可以回復(fù)我~

舉報(bào)

0/150
提交
取消

myeclipse怎么自動(dòng)生成

我要回答 關(guān)注問(wèn)題
微信客服

購(gòu)課補(bǔ)貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動(dòng)學(xué)習(xí)伙伴

公眾號(hào)

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號(hào)