首页 > 代码库 > hibernate.cfg.xml

hibernate.cfg.xml

 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 <hibernate-configuration> 7  8     <session-factory> 9         <property name="connection.url">jdbc:mysql://localhost:3306/hibernate</property>10         <property name="connection.username">root</property>11         <property name="connection.password">root</property>12         <property name="connection.driver_class">com.mysql.jdbc.Driver</property>13         14         <!-- 方言 对应的是org.hiberbate.Dialect  -->15         <property name="dialect">org.hibernate.dialect.MySQL5Dialect</property>16         <property name="show_sql">true</property>17         18         <mapping resource="Team.hbm.xml"/>19         20     </session-factory>21 22 </hibernate-configuration>