<?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>
<!-- 數據庫連接設置 -->
<!-- start -->
<!-- 驅動 -->
<property name="hibernate.connection.driver_class">com.mysql.jdbc.Driver</property>
<!-- url -->
<property name="hibernate.connection.url">jdbc:mysql://localhost:3306/test</property>
<!-- 用戶名 -->
<property name="hibernate.connection.username">root</property>
<!-- 密碼 -->
<property name="hibernate.connection.password">123</property>
<!-- end -->
<!-- 設置連接池上限數目 -->
<property name ="connection.pool_size">1</property>
<!-- 設置sql方言 -->
<property name="hibernate.dialect">org.hibernate.dialect.MySQLDialect</property>
<!-- 是否在控制檯顯示輸出語句 -->
<property name="hibernate.show_sql">true</property>
<!-- 上下文相關的會話 -->
<!--<property name ="current_session_context_class">thread</property>-->
<!--<property name="hibernate.hbm2ddl.auto">update</property>-->
<!-- <mapping resource="/WEB-INF/classes/User.hbm.xml"/>-->
<mapping resource="com/pojo/User.hbm.xml"/>
</session-factory>
</hibernate-configuration>
<!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>
<!-- 數據庫連接設置 -->
<!-- start -->
<!-- 驅動 -->
<property name="hibernate.connection.driver_class">com.mysql.jdbc.Driver</property>
<!-- url -->
<property name="hibernate.connection.url">jdbc:mysql://localhost:3306/test</property>
<!-- 用戶名 -->
<property name="hibernate.connection.username">root</property>
<!-- 密碼 -->
<property name="hibernate.connection.password">123</property>
<!-- end -->
<!-- 設置連接池上限數目 -->
<property name ="connection.pool_size">1</property>
<!-- 設置sql方言 -->
<property name="hibernate.dialect">org.hibernate.dialect.MySQLDialect</property>
<!-- 是否在控制檯顯示輸出語句 -->
<property name="hibernate.show_sql">true</property>
<!-- 上下文相關的會話 -->
<!--<property name ="current_session_context_class">thread</property>-->
<!--<property name="hibernate.hbm2ddl.auto">update</property>-->
<!-- <mapping resource="/WEB-INF/classes/User.hbm.xml"/>-->
<mapping resource="com/pojo/User.hbm.xml"/>
</session-factory>
</hibernate-configuration>