使用Hibernate时,hibernate.cfg.xml的配置文件内容
来源:互联网 发布:淘宝三无产品如何处罚 编辑:程序博客网 时间:2024/06/13 11:41
使用Hibernate,创建的hibernate.cfg.xml文件时,
<!DOCTYPE hibernate-configuration PUBLIC
"-//Hibernate/Hibernate Configuration DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
<hibernate-configuration>
<session-factory>
<!-- 数据库的配置信息 -->
<property name="connection.driver_class">oracle.jdbc.driver.OracleDriver</property>
<property name="connection.url">jdbc:oracle:thin:@localhost:1521:orcl</property>
<property name="connection.username">name</property>
<property name="connection.password">password</property>
<!-- 在控制台显示Hibernate自动生成的SQL语句 -->
<property name="show_sql">true</property>
<!-- 设置方言OracleDialect , Hibernate遇到分页时自动使用rownum伪列实现分页 -->
<property name="dialect">org.hibernate.dialect.OracleDialect</property>
<!-- 开启二级缓存 -->
<property name="cache.use_second_level_cache">true</property>
<!-- 二级缓存供应商 -->
<property name="cache.provider_class">org.hibernate.cache.EhCacheProvider</property>
<!-- 连接池信息 -->
<property name="hibernate.connection.provider_class">org.hibernate.connection.C3P0ConnectionProvider</property>
<!-- 最大连接数 -->
<property name="hibernate.c3p0.max_size">200</property>
<!-- 最小连接数 -->
<property name="hibernate.c3p0.min_size">10</property>
<!-- 获得连接的超时时间,如果超过这个时间,会抛出异常,单位毫秒 -->
<property name="hibernate.c3p0.timeout">1000</property>
<!-- 最大的PreparedStatement的数量 -->
<property name="hibernate.c3p0.max_statements">100</property>
<!-- 每隔120秒检查连接池里的空闲连接 ,单位是秒-->
<property name="hibernate.c3p0.idle_test_period">120</property>
<!-- 当连接池里面的连接用完的时候,C3P0一下获取的新的连接数 -->
<property name="hibernate.c3p0.acquire_increment">2</property>
<!-- 每次都验证连接是否可用 -->
<property name="hibernate.c3p0.validate">true</property>
</session-factory>
</hibernate-configuration>
- 使用Hibernate时,hibernate.cfg.xml的配置文件内容
- hibernate的hibernate.cfg.xml配置文件
- 深入Hibernate 的配置文件hibernate.cfg.xml
- Hibernate的配置文件hibernate.cfg.xml
- Hibernate的主配置文件hibernate.cfg.xml
- Hibernate的主配置文件hibernate.cfg.xml
- Hibernate的主配置文件hibernate.cfg.xml
- Hibernate的主配置文件hibernate.cfg.xml
- Hibernate的主配置文件hibernate.cfg.xml
- Hibernate的主配置文件hibernate.cfg.xml
- Hibernate配置文件hibernate.cfg.xml的详解
- hibernate.cfg.xml 配置文件
- hibernate.cfg.xml配置文件
- hibernate.cfg.xml配置文件
- hibernate.cfg.xml配置文件
- Hibernate.cfg.xml配置文件
- Hibernate.cfg.xml配置文件
- hibernate.cfg.xml配置文件
- igrimace安装常出现问题 uber 陌陌站街 平安易贷 Z spirit借贷宝
- ios网络请求 get——post 区别
- C# 委托
- 读精益数据分析——序
- Ubuntu 安装启动Tomcat
- 使用Hibernate时,hibernate.cfg.xml的配置文件内容
- qt-opensource-windows-x86-vs2010-4.8.6 + qt-creator-windows-opensource-2.8.0
- Linux下Nodejs安装
- 启动Tomcat服务器时遇到的一些坑
- Unity3D运行流图
- 大响应式Web设计框架
- 文章标题
- 多线程
- QT设置窗口背景