hibernate3 配置文件

hibernate3 配置文件
1.Hibernate默认连接池
<? xml version='1.0' encoding='UTF-8' ?>
<! DOCTYPE hibernate-configuration PUBLIC "-//Hibernate/Hibernate Configuration DTD//EN"
"http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd"
>
< hibernate-configuration >
< session-factory  >
<! ?JDBC驱动程序-- >
< property  name ="connection.driver_class" > com.mysql.jdbc.Driver </ property >
<!--  连接数据库的URL -->
< property  name ="connection.url" >  
jdbc:mysql://localhost:3306/schoolproject
</ property >
< property  name ="connection.useUnicode" > true </ property >
< property  name ="connection.characterEncoding" > UTF-8 </ property >
<!-- 连接的登录名 -->
< property  name ="connection.username" > root </ property >
<! ?登录密码-- >
< property  name ="connection.password" ></ property >
<!-- 是否将运行期生成的SQL输出到日志以供调试 -->
< property  name ="show_sql" > true </ property >
<!-- 指定连接的语言 -->
< property  name ="dialect" > org.hibernate.dialect.MySQLDialect </ property >
<!-- 映射Student这个资源 -->
< mapping  resource ="com/wqbi/model/pojo/student.hbm.xml"   />
</ session-factory >  
</ hibernate-configuration

你可能感兴趣的:(hibernate3 配置文件)