<?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://localhost:3306/book1
</property>
<property name="connection.username">root</property>
<property name="connection.password">123456</property>
<property name="connection.driver_class">
com.mysql.jdbc.Driver
</property>
<property name="myeclipse.connection.profile">Test</property>
<!-- getCurentSsssion的session的上下文 -->
<property name="current_session_context_class">thread</property>
<!-- 二级缓存 -->
<property name="cache.use_second_level_cache">true</property>
<property name="hibernate.cache.region.factory_class">
org.hibernate.cache.ehcache.EhCacheRegionFactory
</property>
<property name="javax.persistence.validation.mode">none</property>
<!--查询缓存 -->
<property name="cache.use_query_cache">true</property>
<mapping resource="com/yuntu/entity/Booktype.hbm.xml" />
<mapping resource="com/yuntu/entity/Book.hbm.xml" />

</session-factory>

</hibernate-configuration>

 posted on 2017-04-15 11:51  技术的深奥  阅读(394)  评论(0编辑  收藏  举报