原创作品,允许转载,转载时请务必以超链接形式标明文章
原始出处 、作者信息和本声明。否则将追究法律责任。
http://qingkechina.blog.51cto.com/5552198/1362927
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
<?
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
=
"connection.driver_class"
>com.mysql.jdbc.Driver</
property
>
<
property
name
=
"connection.url"
>jdbc:mysql://localhost:12306/medical</
property
>
<
property
name
=
"connection.username"
>root</
property
>
<
property
name
=
"connection.password"
>Changeme123</
property
>
<!--数据库连接池个数-->
<
property
name
=
"connection.pool_size"
>40</
property
>
<!-- SQL方言,这边设定的是MySQL -->
<
property
name
=
"dialect"
>net.sf.hibernate.dialect.MySQLDialect</
property
>
<
property
name
=
"current_session_context_class"
>thread</
property
>
<
property
name
=
"cache.provider_class"
>org.hibernate.cache.internal.NoCacheProvider</
property
>
<!—为true表示将Hibernate发送给数据库的sql显示出来 -->
<
property
name
=
"show_sql"
>true</
property
>
</
session-factory
>
</
hibernate-configuration
>
|