問題 web 項目中 打開 hibernate.cfg.xml 文件時 提示:The project is not a myEclipse hibernate project。
並且:在 dbbrower中使用 hibernate reverse engineering 建立 表對應的bean 和 配置文件時:找不到可用的javasource路徑。
原因:
使用版本控制的時候,工程根目錄下的: .project 和 .myhibernatedata 文件不在版本控制範圍內,因此組內成員更新source後,缺少
.project 內的 <nature>com.genuitec.eclipse.hibernate.hibernatenature</nature>
和
.myhibernatedata 文件。
解決;
項目名上右鍵--〉myeclipse-->add hibernate capabilites -->next-->hibernate config file --> existing --> end