<?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 ">
<hibernate-configuration>
<session-factory>
<!-- 连接数据库 -->
<property name="connection.driver_class">
com.microsoft.sqlserver.jdbc.SQLServerDriver
</property>
<property name="connection.url">
jdbc:sqlserver://localhost:1433;DatabaseName=Forum
</property>
<property name="connection.username">sa</property>
<property name="connection.password">sa</property>
<!-- 数据库方言 -->
<property name="dialect">
org.hibernate.dialect.SQLServerDialect
</property>
<!-- 是否打印sql语句 -->
<property name="show_sql">true</ property >
<!-- 指定映射文件的位置 -->
<mapping resource="acm/lt/bean/User.hbm.xml" />
</session-factory>
</hibernate-configuration>
<!DOCTYPE hibernate-configuration PUBLIC
"-//Hibernate/Hibernate Configuration DTD 3.0//EN"
" http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd ">
<hibernate-configuration>
<session-factory>
<!-- 连接数据库 -->
<property name="connection.driver_class">
com.microsoft.sqlserver.jdbc.SQLServerDriver
</property>
<property name="connection.url">
jdbc:sqlserver://localhost:1433;DatabaseName=Forum
</property>
<property name="connection.username">sa</property>
<property name="connection.password">sa</property>
<!-- 数据库方言 -->
<property name="dialect">
org.hibernate.dialect.SQLServerDialect
</property>
<!-- 是否打印sql语句 -->
<property name="show_sql">true</ property >
<!-- 指定映射文件的位置 -->
<mapping resource="acm/lt/bean/User.hbm.xml" />
</session-factory>
</hibernate-configuration>