<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE hibernate-configuration PUBLIC
"-//Hibernate/Hibernate Configuration DTD 3.0//EN"
"http://www.hibernate.org/dtd/hibernate-configuration-3.0.dtd">
<!-- Generated by MyEclipse Hibernate Tools. -->
<hibernate-configuration>
<session-factory>
<!-- 第一部分:配置数据库信息 必须的 -->
<property name="dialect">org.hibernate.dialect.MySQLDialect</property>
<property name="connection.url">jdbc:mysql://127.0.0.1:3306/bookstore</property>
<property name="connection.username">root</property>
<property name="connection.password">root</property>
<property name="connection.driver_class">com.mysql.jdbc.Driver</property>
<property name="myeclipse.connection.profile">mysql</property>
<!-- 第二部分:配置hibernate信息可选的 -->
<property name="hibernate.show_sql">true</property>
<property name="format_sql">true</property>
<property name="hbm2ddl.auto">update</property>
<property name="current_session_context_class">thread</property>
<!-- 引入映射文件 -->
<mapping resource="com/test/domain/User.hbm.xml" />
<mapping resource="com/test/domain/Customer.hbm.xml" />
<mapping resource="com/test/domain/LinkMan.hbm.xml" />
<mapping resource="com/test/domain/Role.hbm.xml" />
<mapping resource="com/test/domain/Users.hbm.xml" />
</session-factory>
</hibernate-configuration>
|
|