hibernate数据库连接配置文件
2012-08-09 14:31
357 查看
<!DOCTYPE hibernate-configuration PUBLIC
"-//Hibernate/Hibernate Configuration DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
<hibernate-configuration>
<session-factory>
<property name="hibernate.connection.driver_class">com.mysql.jdbc.Driver</property>
<property name="connection.url">jdbc:mysql:///brank-utf8</property>
<property name="connection.username">root</property>
<property name="connection.password">123456</property>
<property name="dialect">org.hibernate.dialect.MySQLDialect</property>
<property name="show_sql">true</property>
<mapping resource="com/cardvalue/dao/entrty/User.hbm.xml" />
</session-factory>
</hibernate-configuration>
"-//Hibernate/Hibernate Configuration DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
<hibernate-configuration>
<session-factory>
<property name="hibernate.connection.driver_class">com.mysql.jdbc.Driver</property>
<property name="connection.url">jdbc:mysql:///brank-utf8</property>
<property name="connection.username">root</property>
<property name="connection.password">123456</property>
<property name="dialect">org.hibernate.dialect.MySQLDialect</property>
<property name="show_sql">true</property>
<mapping resource="com/cardvalue/dao/entrty/User.hbm.xml" />
</session-factory>
</hibernate-configuration>
相关文章推荐
- hibernate.cfg.xml配置文件,连接oracle数据库和mysql 数据库
- hibernate配置文件如何连接sql server 2008数据库
- 使用Hibernate连接h2数据库的配置文件写的方法(连接字符串)
- hibernate连接多个数据库,如何动态切换(我一般用配置文件动态切换)
- 编码问题 关于hibernate jdbc数据库连接在xml配置与在properties文件配置的差异
- hibernate配置连接数据库的文件
- 深入Hibernate的配置文件---5.4.3: JDBC连接属性
- spring的xml配置文件中获取jdbc.properties乱码导致连接数据库失败
- 连接数据库通过配置文件app.config
- 使用资源文件配置 Spring数据库连接
- C++Builder学习笔记5.1(连接数据库,读写配置文件,加载DLL)
- JDBC实例--通过连接工具类DBUtil +配置文件来获取连接数据库,方便又快捷
- C# 配置文件,获取连接数据库字符串
- ASP.NET数据库连接字符串写在config.web配置文件中
- [java][spring]取得通过配置文件和注解注入的bean、取得当前数据库连接、取得ApplicationContext的方法
- 如何将数据库连接字符串保存在配置文件中并读取
- hibernate中配置数据库连接(集成spring)
- hibernate+sqlserver2005连接对hibernate.cfg.xml文件的配置
- 关于数据库连接及其配置文件,驱动报错
- Hibernate配置XML连接数据库