Hibernate核心配置文件

src目录下 hibernate.cfg.xml:

 1 <?xml version="1.0" encoding="UTF-8"?>
 2 
 3 <!DOCTYPE hibernate-configuration PUBLIC
 4 
 5     "-//Hibernate/Hibernate Configuration DTD 3.0//EN"
 6 
 7     "http://www.hibernate.org/dtd/hibernate-configuration-3.0.dtd">
 8 
 9     <hibernate-configuration>
10 
11     <session-factory>
12 
13     <property name="hibernate.connection.driver_class">com.mysql.jdbc.Driver</property>
14 
15     <property name="hibernate.connection.url">jdbc:mysql:///hibernate_day03?useUnicode=true&amp;characterEncoding=UTF8</property>
16 
17     <property name="hibernate.connection.username">root</property>
18 
19     <property name="hibernate.connection.password"></property>
20 
21     <property name="hibernate.show_sql">true</property>
22 
23     <property name="hibernate.format_sql">true</property>
24 
25     <property name="hibernate.hbm2ddl.auto">update</property>
26 
27     <property name="hibernate.dialect">org.hibernate.dialect.MySQLDialect</property>
28 
29     <mapping resource="cn/cuibin/entity/Customer.hbm.xml"/>
30 
31     <mapping resource="cn/cuibin/entity/LinkMan.hbm.xml"/>
32 
33     </session-factory>
34 
35     </hibernate-configuration>

 

posted @ 2017-04-14 12:46  崔布斯  阅读(163)  评论(0编辑  收藏  举报