你好,游客 登录 注册 搜索
背景:
阅读新闻

Hibernate连接Oracle 10g之hibernate.cfg.xml

[日期:2012-06-14] 来源:Linux社区  作者:userhzw [字体:大 中 小]

Hibernate连接Oracle 10g之hibernate.cfg.xml

  1. <?xml version='1.0' encoding='utf-8'?>  
  2. <!DOCTYPE hibernate-configuration PUBLIC  
  3.         "-//Hibernate/Hibernate Configuration DTD 3.0//EN"  
  4.         "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">  
  5. <hibernate-configuration>  
  6.     <session-factory>  
  7.         <!-- Database connection settings -->  
  8.         <property name="connection.driver_class">oracle.jdbc.driver.OracleDriver</property>  
  9.         <property name="connection.url">jdbc:oracle:thin:@localhost:1521:ORCL</property>  
  10.         <property name="connection.username">scott</property>  
  11.         <property name="connection.password">7788966</property>  
  12.         <!-- JDBC connection pool (use the built-in) -->  
  13.         <property name="connection.pool_size">1</property>  
  14.         <!-- SQL dialect -->  
  15.         <property name="dialect">org.hibernate.dialect.Oracle10gDialect</property>  
  16.         <!-- Enable Hibernate's automatic session context management -->  
  17.         <property name="current_session_context_class">thread</property>  
  18.         <!-- Disable the second-level cache  -->  
  19.         <property name="cache.provider_class">org.hibernate.cache.NoCacheProvider</property>  
  20.         <!-- Echo all executed SQL to stdout -->  
  21.         <property name="show_sql">true</property>  
  22.         <!-- Drop and re-create the database schema on startup -->  
  23.         <property name="hbm2ddl.auto">create</property>  
  24.         <mapping resource="vo/Student.hbm.xml"/>  
  25.     </session-factory>  
  26. </hibernate-configuration>  
linux
本文评论   查看全部评论 (0)
表情: 表情 姓名: 字数

       

评论声明
  • 尊重网上道德,遵守中华人民共和国的各项有关法律法规
  • 承担一切因您的行为而直接或间接导致的民事或刑事法律责任
  • 本站管理人员有权保留或删除其管辖留言中的任意内容
  • 本站有权在网站内转载或引用您的评论
  • 参与本评论即表明您已经阅读并接受上述条款