码迷,mamicode.com
首页 > Web开发 > 详细

Hibernate 配置

时间:2016-10-24 15:56:58      阅读:260      评论:0      收藏:0      [点我收藏+]

标签:cti   app   date   map   connect   mysq   arc   base   tor   


<!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="connection.driver_class">com.mysql.jdbc.Driver</property>
<property name="connection.url">jdbc:mysql:///hbsearch?useUnicode=true&amp;characterEncoding=UTF8</property>
<property name="connection.username">root</property>
<property name="connection.password">xxx</property>
<property name="hibernate.show_sql">true</property>
<property name="hibernate.hbm2ddl.auto">update</property>
<!-- SQL dialect -->
<property name="dialect">
org.hibernate.dialect.MySQL5InnoDBDialect
</property>

<!-- 扫描实体注解对象 -->
<property name="hibernate.search.default.directory_provider" >filesystem</property>

<property name="hibernate.search.default.indexBase">H:/hbsearch</property>

<mapping class="cz.pojo.Book"/>
<mapping class="cz.pojo.Author"/>
</session-factory>
</hibernate-configuration>

Hibernate 配置

标签:cti   app   date   map   connect   mysq   arc   base   tor   

原文地址:http://www.cnblogs.com/cz2012/p/5993246.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!