hibernate配置文件 mysql數據庫

  1. <?xml version='1.0' encoding='UTF-8'?>  
  2. <!DOCTYPE hibernate-configuration PUBLIC   
  3.           "-//Hibernate/Hibernate Configuration DTD 3.0//EN"   
  4.           "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">  
  5.   
  6. <!-- Generated by MyEclipse Hibernate Tools.                   -->  
  7. <hibernate-configuration>  
  8.   
  9.     <session-factory>  
  10.         <property name="myeclipse.connection.profile">mysql</property>  
  11.         <property name="connection.url">  
  12.             jdbc:mysql://localhost:3306/test   
  13.         </property>  
  14.         <property name="connection.username">root</property>  
  15.         <property name="connection.password">admin</property>  
  16.         <property name="connection.driver_class">  
  17.             com.mysql.jdbc.Driver   
  18.         </property>  
  19.         <property name="dialect">  
  20.             org.hibernate.dialect.MySQLDialect   
  21.         </property>  
  22.         <property name="show_sql">true</property>  
  23.         <property name="transaction.factory_class">net.sf.hibernate.transaction.JDBCTransactionFactory</property>  
  24.         <mapping resource="User.hbm.xml" />  
  25.   
  26.     </session-factory>  
  27.   
  28. </hibernate-configuration> 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章