已采納回答 / hyacinth小堇
//創建配置對象 Configuration config = new Configuration().configure();要獲取到hibernate.cfg.xml中的信息
2016-04-02
最贊回答 / IvanYe
應該是因為老師的Address類和Students類在同一個文件夾下如果Address和Students不在同一個文件下test/Students.classmain/Address.class那么<compoent name="address" class="main.Address"></compoent>
2016-04-01
最新回答 / SayYouLoveMe
<mapping resource="Students.hbm.xml"/>你如果沒把Students.hbm.xml放在src下就必須要加上他的跟路徑eg:<mapping ?resource="com/entity/Student.hbm.xml"/>我的就是放在com.entity的,找不到是因為你映射路徑對不上!
2016-03-31