hibernate连接mysql配置文件
来源:互联网 发布:windows 编译so 编辑:程序博客网 时间:2024/06/05 02:00
[html] view plaincopy
- <?xml version="1.0" encoding="GBK"?>
- <!-- 指定Hibernate配置文件的DTD信息 -->
- <!DOCTYPE hibernate-configuration PUBLIC
- "-//Hibernate/Hibernate Configuration DTD 3.0//EN"
- "http://hibernate.sourceforge.net/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/slim</property>
- <property name="connection.useUnicode">true</property>
- <property name="connection.characterEncoding">gbk</property>
- <!-- 指定连接数据库的用户名 -->
- <property name="connection.username">root</property>
- <!-- 指定连接数据库的密码 -->
- <property name="connection.password">gyfbao</property>
- <!-- C3P0连接池设定-->
- <property name="hibernate.connection.provider_class">org.hibernate.connection.C3P0ConnectionProvider</property>
- <!-- 指定连接池里最大连接数 -->
- <property name="hibernate.c3p0.max_size">20</property>
- <!-- 指定连接池里最小连接数 -->
- <property name="hibernate.c3p0.min_size">1</property>
- <!-- 指定连接池里连接的超时时长 -->
- <property name="hibernate.c3p0.timeout">1800</property>
- <!-- 指定连接池里最大缓存多少个Statement对象 -->
- <property name="hibernate.c3p0.max_statements">100</property>
- <property name="hibernate.c3p0.idle_test_period">500</property>
- <property name="hibernate.c3p0.acquire_increment">2</property>
- <property name="hibernate.c3p0.validate">true</property>
- <property name="hibernate.c3p0.preferredTestQuery ">select 1 </property>
- <property name="hibernate.c3p0.idleConnectionTestPeriod ">18000</property>
- <property name="hibernate.c3p0.maxIdleTime">25000</property>
- <property name="hibernate.c3p0.testConnectionOnCheckout">true</property>
- <!-- 指定数据库方言 -->
- <property name="dialect">org.hibernate.dialect.MySQLInnoDBDialect</property>
- <!-- 根据需要自动创建数据库 -->
- <property name="hbm2ddl.auto">update</property>
- <!-- 显示Hibernate持久化操作所生成的SQL -->
- <property name="show_sql">true</property>
- <!-- 将SQL脚本进行格式化后再输出-->
- <property name="hibernate.format_sql">true</property>
- <!-- 罗列所有的映射文件
- <mapping resource="User.hbm.xml"/>
- <mapping resource="Area.hbm.xml"/>
- </session-factory>
- </hibernate-configuration>
0 0
- hibernate连接mysql配置文件
- hibernate连接mysql配置文件
- hibernate连接mysql配置文件
- Hibernate配置文件连接Mysql
- hibernate连接mysql配置文件
- Hibernate连接MySQL数据库配置文件
- hibernate连接mysql配置文件 分享
- Hibernate连接MySql数据库时 Hibernate.cfg.xml配置文件
- Hibernate连接MySql数据库时 Hibernate.cfg.xml配置文件
- Hibernate连接Mysql主配置文件方法(连接字符串)
- hibernate.cfg.xml配置文件,连接oracle数据库和mysql 数据库
- Hibernate连接配置文件
- hibernate配置文件 mysql数据库
- 使用hibernate连接mysql数据库正向工程hibernate.cfg.xml文件和xxx.hbm.xml配置文件
- 【配置文件】MySQL的hibernate.cfg.xml配置文件
- spring+hibernate连接mysql
- mysql+hibernate连接配置
- hibernate连接mysql示范
- 循迹小车(1)
- Merge k Sorted Lists——Difficulty:Hard
- An internal error occurred during: "Launching ??? on Tomcat".nullpointerException
- 视频直播技术详解(3)编码和封装
- spark学习笔记1 spark算子
- hibernate连接mysql配置文件
- 17. Letter Combinations of a Phone Number
- hibernate 乐观锁与悲观锁使用
- 我的Android笔记--Hello Jni
- hibernate配置多数据源
- 视频直播技术详解(4)推流和传输
- NetworkManagerHUD源代码
- UNIX 个人常用命令积累
- nRF51822SDK中db_discovery学习笔记