码迷,mamicode.com
首页 > Web开发 > 详细

Hibernate框架的配置

时间:2016-11-15 00:22:49      阅读:189      评论:0      收藏:0      [点我收藏+]

标签:reverse   建表   lib   strong   数据   分享   jar   对象   show   

概念  持久化框架  把对象保存到数据库中,对数据的CURD操作

 

配置Hibernate

1、在项目中引入Hibernate的Jar包

在 WebContent/WEB-INF/lib 目录下 导入jar包

技术分享

 

2、在Java Resources 下创建 hibernate.cfg.xml,并填写相应信息

创建:

技术分享

配置:

技术分享

 

修改 hibernate.cfg.xml  

        <!-- 调试 -->
        <property name="hibernate.show_sql">true</property>
        <property name="hibernate.format_sql">true</property>
        
        <!-- 自动建表方式 -->
        <property name="hibernate.hbm2ddl.auto">update</property>

 

3、创建 Hibernate Console Configuration

4、创建 Hibernate Reverse Engineering File

 

Hibernate框架的配置

标签:reverse   建表   lib   strong   数据   分享   jar   对象   show   

原文地址:http://www.cnblogs.com/zs6666/p/6063821.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!