hibernate:Hibernate连接池小结
来源:互联网 发布:淘宝网雪地靴童鞋 编辑:程序博客网 时间:2024/05/18 02:03
默认:
<?xml version='1.0'encoding='UTF-8'?>
<!DOCTYPE hibernate-configuration PUBLIC
"-//Hibernate/Hibernate Configuration DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
<!-- Generated by MyEclipse HibernateTools. -->
<hibernate-configuration>
<session-factory>
<!-- JDBC连接信息-->
<propertyname="connection.username">root</property>
<!-- 如果不想用proxool解决数据库与dao类传输过程中的乱码问题,可以直接这样改正
<propertyname="connection.url">jdbc:mysql://localhost:3306/test?useUnicode=true&characterEncoding=utf-8</property>
-->
<propertyname="connection.url">jdbc:mysql://localhost:3306/test</property>
<propertyname="dialect">org.hibernate.dialect.MySQLDialect</property>
<propertyname="myeclipse.connection.profile">test923db</property>
<propertyname="connection.driver_class">com.mysql.jdbc.Driver</property>
<!-- 附属配置信息 -->
<propertyname="show_sql">true</property>
<propertyname="format_sql">true</property>
<!-- 映射文件告知 -->
<mappingresource="com/lovo/bean/UserBean.hbm.xml"/>
<mappingresource="com/lovo/bean/HusbandBean.hbm.xml"/>
<mappingresource="com/lovo/bean/WifeBean.hbm.xml"/>
</session-factory>
</hibernate-configuration>
C3P0:
<?xml version='1.0'encoding='UTF-8'?>
<!DOCTYPE hibernate-configuration PUBLIC
"-//Hibernate/Hibernate Configuration DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
<!-- Generated by MyEclipse HibernateTools. -->
<hibernate-configuration>
<session-factory>
<!-- JDBC连接信息-->
<propertyname="connection.username">root</property>
<?xml version='1.0'encoding='UTF-8'?>
<!DOCTYPE hibernate-configuration PUBLIC
<!-- Generated by MyEclipse HibernateTools.
<hibernate-configuration>
</hibernate-configuration>
C3P0:
<?xml version='1.0'encoding='UTF-8'?>
<!DOCTYPE hibernate-configuration PUBLIC
<!-- Generated by MyEclipse HibernateTools.
<hibernate-configuration>