Hibernate配置
来源:互联网 发布:全站仪编程 编辑:程序博客网 时间:2024/06/08 13:52
大配置:
<?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">oracle.jdbc.driver.OracleDriver</property> <property name="connection.url">jdbc:oracle:thin:@localhost:1521:orcl</property> <property name="connection.username">y2165</property> <property name="connection.password">y2165</property> <!-- SQL dialect 方言--> <property name="dialect">org.hibernate.dialect.Oracle10gDialect</property> <!-- Enable Hibernate's automatic session context management --> <!-- <property name="current_session_context_class">thread</property>--> <!-- Echo all executed SQL to stdout 打印sql--> <property name="show_sql">true</property> <!--格式化sql--> <property name="format_sql">true</property> <!-- Drop and re-create the database schema on startup 自动构建表结构 --> <property name="hbm2ddl.auto">update</property> <mapping resource="cn/bdqn/entity/Dog.hbm.xml"/> </session-factory></hibernate-configuration>
小配置:
<?xml version="1.0"?><!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN" "http://www.hibernate.org/dtd/hibernate-mapping-3.0.dtd"><hibernate-mapping package="cn.bdqn.entity"><class name="Dog" table="Dog"> <id name="id" column="id"> <generator class="native"></generator> </id> <property name="name" column="name"></property> <property name="age" column="age"></property></class></hibernate-mapping>
阅读全文
0 0
- hibernate-hibernate的配置
- 【Hibernate】2.Hibernate配置
- Hibernate 配置!
- Hibernate配置
- Hibernate配置
- Hibernate 配置
- Hibernate配置
- Hibernate配置
- Hibernate配置
- Hibernate配置
- hibernate 配置
- Hibernate 配置
- Hibernate 配置
- hibernate配置
- 配置HIbernate
- Hibernate 配置
- Hibernate配置
- Hibernate配置
- urllib与urllib2
- 基于用户投票的排名算法(五):威尔逊区间
- jsonp跨域
- 转载 修改ulimit值的学习点滴:
- 根据日期获取生肖,根据日期获取星座
- Hibernate配置
- PHP session and cookie
- 链表
- devexpress 上下滚动条
- 如何定位Android NDK开发中遇到的错误
- Android的项目应用总结
- 页面加载完不在顶部
- Vetx.x : EventLoop线程不要锁(Synchronized/ReentrantLock)
- java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.Object android.content.