
Hibernate核心配置文件详细解析提供一个链接:http://www.linuxidc.com/Linux/2012-12/75962.htm
<!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.mysql.jdbc.Driver</property>
<properyt name="hibernate.connection.url">jdbc:mysql://localhost:3306/hibernate_first</properyt>
<property name="hibernate.connection.username">root</property>
<property name="hibernate.connection.password">bjpowernode</property>
<property name="hibernate.dialect">org.hibernate.dialect.MySQLDialect</property>
<property name="hibernate.show_sql">true</property>
<property name="hibernate.format_sql">true</property>
<!-- 具体映射文件 -->
<mapping resource="com/bjpowernode/hibernate/User.hbm.xml"/>
</session-factory>
</hibernate-configuration>
Hibernate的映射流程大概就是
实体类(.class)--->实体类映射文件(xx.hbm.xml)--->hibernate核心配置文件(hibernate.cfg.xml)
--->数据库导出工具(DBExport)依赖于SchemaExport类
