<!--MySql 驱动程序 eg. mysql-connector-java-5.0.4-bin.jar-->
<property name="dialect">org.hibernate.dialect.MySQLDialect</property>
<property name="connection.driver_class">com.mysql.jdbc.Driver</property>
<!-- JDBC URL -->
<property name="connection.url">jdbc:mysql://localhost/dbname?characterEncoding=gb2312</property>
<!-- 数据库用户名-->
<property name="connection.username">root</property>
<!-- 数据库密码-->
<property name="connection.password">root</property>
<!--Sql Server 驱动程序 eg. jtds-1.2.jar-->
<property name="dialect">org.hibernate.dialect.SQLServerDialect</property>
<property name="connection.driver_class">net.sourceforge.jtds.jdbc.Driver</property>
<!-- JDBC URL -->
<property name="connection.url">jdbc:jtds:sqlserver://localhost:1433;DatabaseName=dbname</property>
<!-- 数据库用户名-->
<property name="connection.username">sa</property>
<!-- 数据库密码-->
<property name="connection.password"></property>
<!--Oracle 驱动程序 ojdbc14.jar-->
<property name="dialect">org.hibernate.dialect.OracleDialect</property>
<property name="connection.driver_class">oracle.jdbc.driver.OracleDriver</property>
<!-- JDBC URL -->
<property name="connection.url">jdbc:oracle:thin:@localhost:1521:dbname</property>
<!-- 数据库用户名-->
<property name="connection.username">test</property>
<!-- 数据库密码-->
<property name="connection.password">test</property>
分享到:
相关推荐
Hibernate不同数据库的连接及SQL方言
hibernate支持的所有数据库方言。用起来很方便。
Hibernate 不同数据库的连接及SQL方言,Hibernate 不同数据库的连接及SQL方言,Hibernate 不同数据库的连接及SQL方言,Hibernate 不同数据库的连接及SQL方言,
达梦数据库各版本的hibernate方言包,包含版本 DmDialect-for-hibernate2.0、DmDialect-for-hibernate2.1、DmDialect-for-hibernate3.0、DmDialect-for-hibernate3.1、DmDialect-for-hibernate3.6、DmDialect-for-...
Hibernate不同数据库的连接及SQL方言.pdf
HibernateSHibernateSpring数据库的事务HibernateSpring数据库的事务HibernateSpring数据库的事务pring数据库的事务
* 达梦8 hibernate方言包对应版本说明 /*************************************** jar包在dialect目录下: 1. DmDialect-for-hibernate2.0.jar 对应 Jdk1.4及以上, hibernate2.0 环境 2. DmDialect-for-hibernate2.1...
动态切换 java hibernate不同数据库之间的动态切换
Hibernate操作数据库的方法.doc
Hibernate多数据库支持解决方案 一、 去掉数据库级的外键关联 二、 如何动态加载.hbm.xml文件 三、 配置文件的加载 四、 大字段处理 五、 hibernate主键生成器(数值型主键操作方法) 六、 Oracle 转换 SQL Server ...
详细介绍Hibernate操作数据库的步骤,附例图
2.2、打开此文件,将“<property name="hibernate.connection.url">jdbc:sqlite:D:/EGSDatabase.egsdata”一行中的数据库文件("D:/EGSDatabase.egsdata")修改为合适的数据库文件。 注:附件包含了...
hibernate 动态数据库进化版 http://blog.csdn.net/hellojava1234/article/details/9949359
hibernate 操作数据库的详细图解。
hibernate方言包
hibernate数据库操作jar包
使用Hibernate的Session对象操作数据库 1.初始化Hibernate:在要使用Hibernate的类的方法中实例化Configuration对象并用Configuration对象的configure()方法将hibernate.cfg.xml中的配置加载到内存,即: ...
hibernate和数据库的各种包 mysql oracel
hibernate连接数据库的连接配置。包括oracle等一系列配置。
瀚高数据库hibernate方言 hgdb-hibernate-dialect