Hibernate中自带的连接池!!!

<span style="font-size:18px; font-family: Arial, Helvetica, sans-serif;"><?xml version="1.0" encoding="UTF-8"?></span>
<span style="font-size:18px;"><!DOCTYPE hibernate-configuration PUBLIC
	"-//Hibernate/Hibernate Configuration DTD 3.0//EN"
	"http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
<hibernate-configuration>
	<session-factory>
		<strong><property name="hibernate.connection.username">root</property>
	<span style="white-space:pre">	</span><property name="hibernate.connection.password">mysqladmin</property>
		<property name="hibernate.connection.url">jdbc:mysql://localhost:3306/crm</property>
		<property name="hibernate.connection.driver_class">com.mysql.jdbc.Driver</property></strong>
		<property name="hibernate.connection.autocommit">true</property>
		<property name="hibernate.dialect">org.hibernate.dialect.MySQL5Dialect</property>
		<property name="hibernate.hbm2ddl.auto">update</property>
		<property name="hibernate.show_sql">true</property>
		<mapping resource="cn/itcast/crm/domain/SysUserGroup.hbm.xml"/>
		<mapping resource="cn/itcast/crm/domain/SysRole.hbm.xml"/>
	</session-factory>
</hibernate-configuration></span>	
Hibernate中自带的数据库连接池:

Hibernate.cfg.xml文件配置中:也相当于一个连接池,是Hibernate的开发人员自己写的连接池。简单而灵巧的连接池。供学习者,学习使用。

切记:在真正的开发中,不用此连接池。

你可能感兴趣的:(数据库连接池)