hibernate.cfg.xml && eg

<!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.url">jdbc:mysql://localhost/examsystem</property>
  <property name="connection.driver_class">com.mysql.jdbc.Driver</property>
  <property name="connection.username">root</property>
  <property name="connection.password"></property>
  <property name="dialect">org.hibernate.dialect.MySQLDialect</property>
  <property name="show_sql">true</property>
  <property name="hibernate.hbm2ddl.auto">update</property>
  <!-- -->
<mapping resource="com/yanquan/model/Cand_paper.hbm.xml"/>
<mapping resource="com/yanquan/model/Candidate_info.hbm.xml"/>
<mapping resource="com/yanquan/model/Test_paper_library.hbm.xml"/>
  <mapping resource="com/yanquan/model/Table_mana.hbm.xml"/>
 
</session-factory>

</hibernate-configuration>

你可能感兴趣的:(Hibernate,xml,mysql,.net,jdbc)