mssql server2005 hibernate配置

<?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="hibernate.connection.driver_class">com.microsoft.sqlserver.jdbc.SQLServerDriver</property>
  <property name="hibernate.connection.url">jdbc:sqlserver://localhost:1433;DatabaseName=wrz</property>
  <property name="hibernate.connection.username">sa</property>
  <property name="hibernate.connection.password">1234</property>
  <property name="hibernate.hbm2ddl.auto">create</property>
  
  <property name="dialect">org.hibernate.dialect.SQLServerDialect</property>
  <property name="hibernate.show_sql">true</property>
  <!-- 配置ORM文件 -->
  <mapping resource="demo/xfire/entity/User.hbm.xml"/>
</session-factory>
</hibernate-configuration>

jdbc驅動下載地址:http://download.csdn.net/detail/wjg19890301/5099501
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章