hibernate.cfg.xml
来源:互联网 发布:php的csrf防护 编辑:程序博客网 时间:2024/05/27 21:48
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE hibernate-configuration PUBLIC"-//Hibernate/Hibernate Configuration DTD 3.0//EN""http://www.hibernate.org/dtd/hibernate-configuration-3.0.dtd"><hibernate-configuration><session-factory><!-- 配置连接数据库的基本的信息 --><property name="hibernate.connection.driver_class">com.mysql.jdbc.Driver</property><property name="hibernate.connection.url">jdbc:mysql:///ssh_37</property><property name="hibernate.connection.username">root</property><property name="hibernate.connection.password">123456</property><!-- 配置Hibernate的相关属性 --><property name="hibernate.dialect">org.hibernate.dialect.MySQLDialect</property><!-- 可选属性 --><!-- 显示SQL --><property name="hibernate.show_sql">true</property><!-- 格式化SQL --><property name="hibernate.format_sql">true</property><!-- hibernate.hbm2ddl.auto:Hibernate的映射转成DDL* create:每次都会创建一个新的表。(如果没有表,创建表,如果数据库有表,删除该表,重新创建一个表)-测试的时候* create-drop:每次都会创建一个新的表,程序结束后,会删除该表。-测试的时候* update:如果没有表,创建一个新表,如果有表,使用原有表,更新表结构。* validate:只会使用原有的表。校验映射和表结构是否一致。 --><property name="hibernate.hbm2ddl.auto">update</property><!-- 配置C3P0连接池 --><property name="connection.provider_class">org.hibernate.connection.C3P0ConnectionProvider</property><!--在连接池中可用的数据库连接的最少数目 --><property name="c3p0.min_size">5</property><!--在连接池中所有数据库连接的最大数目 --><property name="c3p0.max_size">20</property><!--设定数据库连接的过期时间,以秒为单位,如果连接池中的某个数据库连接处于空闲状态的时间超过了timeout时间,就会从连接池中清除 --><property name="c3p0.timeout">120</property> <!--每3000秒检查所有连接池中的空闲连接 以秒为单位--><property name="c3p0.idle_test_period">3000</property><!-- 加载映射文件: --><mapping resource="com/itheima/ssh/domain/Customer.hbm.xml"/></session-factory></hibernate-configuration>
阅读全文
0 0
- hibernate.cfg.xml
- 关于hibernate.cfg.xml
- hibernate.cfg.xml配置
- hibernate.cfg.xml
- hibernate.cfg.xml 配置文件
- hibernate-cfg.xml
- hibernate.cfg.xml
- hibernate.cfg.xml模板
- hibernate.cfg.xml
- hibernate.cfg.xml
- hibernate.cfg.xml模板
- hibernate.cfg.xml
- hibernate.cfg.xml
- hibernate.cfg.xml
- hibernate.cfg.xml配置
- hibernate.cfg.xml
- hibernate.cfg.xml
- hibernate.cfg.xml配置文件
- 移动端触摸事件总结
- eigen求特征值和特征向量
- 数组++、对象、ES5Array新增方法
- 几种分类问题的区别:多类分类,多标签分类,多示例学习,多任务学习
- Python第三方库:Pyinstaller——神奇的Py打包工具
- hibernate.cfg.xml
- 使用MyEclipse简化hibernate开发
- Digit Counting UVA
- jquery $(document).ready() 与window.onload的区别
- 【HDU 4552】怪盗基德的挑战书(kmp)
- 数塔
- C++的运算符重载
- Krpano插件---view标签说明
- 学习(Broadcast Receiver) 个人笔记三