5.hibernate的配置文件.cfg.xml
来源:互联网 发布:淘宝苹果官方旗舰店 编辑:程序博客网 时间:2024/06/07 14:47
<?xml version="1.0" encoding="GBK"?>
<!-- 指定Hibernate配置文件的DTD信息 -->
<!DOCTYPE hibernate-configuration PUBLIC
"-//Hibernate/Hibernate Configuration DTD 3.0//EN"
"http://www.hibernate.org/dtd/hibernate-configuration-3.0.dtd">
<!-- hibernate- configuration是连接配置文件的根元素 -->
<hibernate-configuration>
<session-factory>
<!-- 指定连接数据库所用的驱动 -->
<property name="connection.driver_class">com.mysql.jdbc.Driver</property>
<!-- 指定连接数据库的url,hibernate连接的数据库名 -->
<property name="connection.url">jdbc:mysql://localhost/test</property>
<!-- 指定连接数据库的用户名 -->
<property name="connection.username">root</property>
<!-- 指定连接数据库的密码 -->
<property name="connection.password">111111</property>
<!-- 指定连接池里最大连接数 -->
<property name="hibernate.c3p0.max_size">20</property>
<!-- 指定连接池里最小连接数 -->
<property name="hibernate.c3p0.min_size">1</property>
<!-- 指定连接池里连接的超时时长 -->
<property name="hibernate.c3p0.timeout">5000</property>
<!-- 指定连接池里最大缓存多少个Statement对象 -->
<property name="hibernate.c3p0.max_statements">100</property>
<property name="hibernate.c3p0.idle_test_period">3000</property>
<property name="hibernate.c3p0.acquire_increment">2</property>
<property name="hibernate.c3p0.validate">true</property>
<!-- 指定数据库方言 -->
<property name="dialect">org.hibernate.dialect.MySQLInnoDBDialect</property>
<!-- 根据需要自动创建数据库 -->
<property name="hbm2ddl.auto">create</property>
<!-- 显示Hibernate持久化操作所生成的SQL -->
<property name="show_sql">true</property>
<!-- 将SQL脚本进行格式化后再输出 -->
<property name="hibernate.format_sql">true</property>
<!-- 罗列所有的映射文件 -->
<mapping resource="xxx/xxx/xxx.hbm.xml"/>
</session-factory>
</hibernate-configuration>
<!-- 指定Hibernate配置文件的DTD信息 -->
<!DOCTYPE hibernate-configuration PUBLIC
"-//Hibernate/Hibernate Configuration DTD 3.0//EN"
"http://www.hibernate.org/dtd/hibernate-configuration-3.0.dtd">
<!-- hibernate- configuration是连接配置文件的根元素 -->
<hibernate-configuration>
<session-factory>
<!-- 指定连接数据库所用的驱动 -->
<property name="connection.driver_class">com.mysql.jdbc.Driver</property>
<!-- 指定连接数据库的url,hibernate连接的数据库名 -->
<property name="connection.url">jdbc:mysql://localhost/test</property>
<!-- 指定连接数据库的用户名 -->
<property name="connection.username">root</property>
<!-- 指定连接数据库的密码 -->
<property name="connection.password">111111</property>
<!-- 指定连接池里最大连接数 -->
<property name="hibernate.c3p0.max_size">20</property>
<!-- 指定连接池里最小连接数 -->
<property name="hibernate.c3p0.min_size">1</property>
<!-- 指定连接池里连接的超时时长 -->
<property name="hibernate.c3p0.timeout">5000</property>
<!-- 指定连接池里最大缓存多少个Statement对象 -->
<property name="hibernate.c3p0.max_statements">100</property>
<property name="hibernate.c3p0.idle_test_period">3000</property>
<property name="hibernate.c3p0.acquire_increment">2</property>
<property name="hibernate.c3p0.validate">true</property>
<!-- 指定数据库方言 -->
<property name="dialect">org.hibernate.dialect.MySQLInnoDBDialect</property>
<!-- 根据需要自动创建数据库 -->
<property name="hbm2ddl.auto">create</property>
<!-- 显示Hibernate持久化操作所生成的SQL -->
<property name="show_sql">true</property>
<!-- 将SQL脚本进行格式化后再输出 -->
<property name="hibernate.format_sql">true</property>
<!-- 罗列所有的映射文件 -->
<mapping resource="xxx/xxx/xxx.hbm.xml"/>
</session-factory>
</hibernate-configuration>
0 0
- 5.hibernate的配置文件.cfg.xml
- 【配置文件】MySQL的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配置文件
- 元素水平垂直居中方法集锦
- 程序员准备面试时容易犯的10个错误
- iOS 中的编码问题(get请求 post请求等)
- 【学习笔记】【Windows命令行详解手册】【二、充分利用命令行】
- 【后缀数组】【spoj 220】Relevant Phrases of Annihilation
- 5.hibernate的配置文件.cfg.xml
- Android Accessibility(辅助功能) --实现Android应用自动安装、卸载
- ubuntu 14.04 LTS 使用rdesktop 剪贴板 无作用的问题解决
- 【转】使用Visual C# 2010编写串口程序
- 蜕变成PHP程序员的我
- Jenkins运行utPLSQL案例
- 重建Oracle OLAP的方法
- myeclipse6.5发布项目出现一些文件被锁,发布不成功
- presentation Controllers的使用(二)