說(shuō)明
在使用Hibernate框架進(jìn)行開(kāi)發(fā)時(shí)可能會(huì)遇到配置錯(cuò)誤或者需要?jiǎng)h除Hibernate支持的情況。下面就說(shuō)一下如何徹底移除項(xiàng)目的Hibernate支持。移除后就能重新添加Hibernate支持,重新配置了。
找到你的項(xiàng)目的目錄
刪除.myhibernatedata文件
找到.project文件,用記事本打開(kāi),找到如下字段
<buildCommand>
<name>com.genuitec.eclipse.hibernate.HibernateBuilder</name>
<arguments>
</arguments>
</buildCommand>
刪除以上5行配置信息。
再向下找到<nature>com.genuitec.eclipse.hibernate.hibernatenature</nature>
,同樣將其刪除
- 做完這些之后你就可以刪除你項(xiàng)目中的hibernate.cfg.xml文件和其他Hibernate相關(guān)的類了。
至此,已經(jīng)完全移除項(xiàng)目中Hibernate框架,你可以在Myeclipse中重新添加Hibernate了。