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

 

配置Hibernate

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

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

Hibernate框架的配置

 

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

创建:

Hibernate框架的配置

配置:

Hibernate框架的配置

 

修改 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

 

相关文章:

  • 2021-04-03
  • 2021-10-08
  • 2022-12-23
  • 2018-03-07
  • 2021-06-23
  • 2022-12-23
  • 2021-12-16
  • 2021-10-11
猜你喜欢
  • 2021-09-04
  • 2021-10-05
  • 2022-02-13
  • 2021-08-06
  • 2022-12-23
  • 2021-10-05
  • 2021-09-04
相关资源
相似解决方案