<?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">
<hibernate-configuration>
<session-factory>
<!-- 配置数据库连接 -->
<property name="hibernate.connection.driver_class">
com.mysql.jdbc.Driver
</property>
<property name="hibernate.connection.url">jdbc:mysql://localhost:3306/day037_crm_ssh</property>
<property name="hibernate.connection.username">root</property>
<property name="hibernate.connection.password">123</property>
<property name="hibernate.connection.dialect">
org.hibernate.dialect.MySQLDialect
</property>
<!-- 配置hibernate -->
<property name="hibernate.show_sql">true</property>
<property name="hibernate.format_sql">true</property>
<property name="hibernate.hbm2ddl.auto">update</property>
<property name="use_sql_comments">true</property>
<!-- 将session绑定到当前线程 -->
<!-- <property name="hibernate.current_session_context_class">thread</property> -->
<!-- C3P0接管 -->
<property name="hibernate.connection.provider_class">org.hibernate.connection.C3P0ConnectionProvider</property>
<!-- 加载资源 -->
<mapping resource="com/maeeki/domain/Customer.hbm.xml"/>
<mapping resource="com/maeeki/domain/Linkman.hbm.xml"/>
</session-factory>
</hibernate-configuration>
hibernate配置文件hibernate
最新推荐文章于 2024-06-04 09:07:32 发布