hibernate配置sessionfaction(hibernate.cfg.xml)

配置mysql时:


"-//Hibernate/Hibernate Configuration DTD 3.0//EN"
"http://www.hibernate.org/dtd/hibernate-configuration-3.0.dtd">




org.hibernate.dialect.MySQLDialect

com.mysql.jdbc.Driver

jdbc:mysql://localhost:3306/test

root

root


org.springframework.orm.hibernate4.SpringSessionContext

true

update



Oracle数据库:


"-//Hibernate/Hibernate Configuration DTD 3.0//EN"
"http://www.hibernate.org/dtd/hibernate-configuration-3.0.dtd">



org.hibernate.dialect.Oracle10iDialect

oracle.jdbc.driver.OracleDriver

jdbc:oracle:thin:@localhost:1521:orcl

scott

tiger

org.springframework.orm.hibernate4.SpringSessionContext

true

update






你可能感兴趣的:(Oracle,hibernate,mysql)