搭建hibernate 环境

来源:互联网 发布:姚明nba前几场比赛数据 编辑:程序博客网 时间:2024/06/06 06:29

材料:(这里用以下版本为例)

①.hibernatetools-Update-4.1.1.Final.zip

②.eclipseJee

③.hibernate-release-4.2.4.Final


第一步:安装hibernate 插件

在eclipseJee 的菜单栏上面找到 Help -->  Install New Software... --> add -->  Archive...  --> 在目录中找到hibernatetools-Update-4.1.1.Final.zip  

--> 然后给Name 里面的 Jboss Tools hibernatetools NightlyBuild Update Site 打上√ --> 一直Next  --> 接着跳出两个弹出框,一个OK, 一个YES

--> 接着自动重启了eclipse --> 右击项目,New --> Other --> 如果里面能找到hibernate,说明插件安装成功


第二步: 导入hibernate 必须的jar 包:

打开hibernate-release-4.2.4.Final \lib \required  把里面全部的jar 文件都放入项目中即可!


第三步: 如果hibernate 文件中没有快捷方式的提示

重新关联http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd (这里以我自己的版本为例子), 执行以下操作:

点击菜单栏上面的Window --> Preferences --> XML --> XML Catalog --> 把里面之前的http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd,进行remove操作

--> add --> File System... -->  找到你的hibernate-release-4.2.4.Final \project\hibernate-core \src \main \resources \org \hibernate\ hibernate-configuration-3.0.dtd

--> 接着Key type 选择URI --> key 输入: http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd --> OK 即可


原创粉丝点击