欧美三区_成人在线免费观看视频_欧美极品少妇xxxxⅹ免费视频_a级毛片免费播放_鲁一鲁中文字幕久久_亚洲一级特黄

Hibernate加載其數據庫配置

系統 1954 0
???? Hibernate加載其配置文件hibernate.properties和hibernate.cfg.xml,常用xml文件比較直觀,方便管理, Hibernate 是一個流行的開源對象關系映射工具,方便連接不同數據庫,更換數據庫,只要修改Hibernate配置文件,大度減少項目的維護。
???? 完整的配置如下:
<!----> <? xml?version='1.0'?encoding='utf-8' ?>
<! DOCTYPE?hibernate-configuration?PUBLIC
????????"-//Hibernate/Hibernate?Configuration?DTD?3.0//EN"
????????"http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd"
>

< hibernate-configuration >

????
< session-factory >

????????
<!-- ?Database?connection?settings? -->
????????
< property? name ="connection.driver_class" > org.hsqldb.jdbcDriver </ property >
????????
< property? name ="connection.url" > jdbc:hsqldb:hsql://localhost /test</ property >
????????
< property? name ="connection.username" > sa </ property >
????????
< property? name ="connection.password" ></ property >

????????
<!-- ?JDBC?connection?pool?(use?the?built-in)? -->
????????
< property? name ="connection.pool_size" > 1 </ property >

????????
<!-- ?SQL?dialect? -->
????????
< property? name ="dialect" > org.hibernate.dialect.HSQLDialect </ property >

????????
<!-- ?Enable?Hibernate's?automatic?session?context?management? -->
????????
< property? name ="current_session_context_class" > thread </ property >

????????
<!-- ?Disable?the?second-level?cache?? -->
????????
< property? name ="cache.provider_class" > org.hibernate.cache.NoCacheProvider </ property >

????????
<!-- ?Echo?all?executed?SQL?to?stdout? -->
????????
< property? name ="show_sql" > true </ property >

????????
<!-- ?Drop?and?re-create?the?database?schema?on?startup? -->
????????
< property? name ="hbm2ddl.auto" > create </ property >

????????
< mapping? resource ="../*.hbm.xml" />

????
</ session-factory >

</ hibernate-configuration >
???? 常用數據庫連接
???? MySql 3/4/5:
<!----> ?? < property? name ="dialect" > org.hibernate.dialect.MySQLDialect </ property >
??

?? <
property? name ="connection.driver_class" > com.mysql.jdbc.Driver </ property >
??
< property? name ="connection.url" > jdbc:mysql://localhost:3306/test </ property > ????
??
< property? name ="connection.username" > root </ property >
??
< property? name ="connection.password" > </ property >
??? Microsoft SQLServer (via jTDS):
<!----> ?? < property? name ="dialect" > org.hibernate.dialect.SQLServerDialect </ property >
??

?? <
property? name ="connection.driver_class" > net.sourceforge.jtds.jdbc.Driver </ property >
??
< property? name ="connection.url" > jdbc:jtds:sqlserver://localhost:1433/test;useCursors=true </ property > ????
??
< property? name ="connection.username" > sa </ property >
??
< property? name ="connection.password" ></ property > ??
??? IBM DB2:
<!----> ?? < property? name ="dialect" > org.hibernate.dialect.DB2Dialect </ property >
??

?? <
property? name ="connection.driver_class" > com.ibm.db2.jcc.DB2Driver </ property >
??
< property? name ="connection.url" > jdbc:db2://localhost:50000/test </ property > ????
??
< property? name ="connection.username" > db2inst1 </ property >
??
< property? name ="connection.password" ></ property > ?
??? Oracle:
<!----> ?? < property? name ="dialect" > org.hibernate.dialect.OracleDialect </ property >
??

?? <
property? name ="connection.driver_class" > oracle.jdbc.driver.OracleDriver </ property >
??
< property? name ="connection.url" > jdbc:oracle:thin:@localhost:1521:test </ property > ????
??
< property? name ="connection.username" > ora </ property >
??
< property? name ="connection.password" ></ property >
??? Informix:
<!----> ?? < property? name ="dialect" > org.hibernate.dialect.InformixDialect </ property >
??

?? <
property? name ="connection.driver_class" > com.informix.jdbc.IfxDriver </ property >
??
< property? name ="connection.url" > jdbc:informix-sqli://localhost:1526/test:informixserver=server1 </ property > ????
??
< property? name ="connection.username" > root </ property >
??
< property? name ="connection.password" ></ property > ??
??
< property? name ="connection.encoding" > true </ property >
??? Sybase (via jTDS):
<!----> ?? < property? name ="dialect" > org.hibernate.dialect.SybaseDialect </ property >
??
?? < property? name ="connection.driver_class" > net.sourceforge.jtds.jdbc.Driver </ property >
??
< property? name ="connection.url" > jdbc:jtds:sybase://localhost:7100/test;useCursors=true </ property > ????
??
< property? name ="connection.username" > root </ property >
??
< property? name ="connection.password" ></ property >
??? PostgreSQL:
<!----> ?? < property? name ="dialect" > org.hibernate.dialect.PostgreSQLDialect </ property >
??
?? < property? name ="connection.driver_class" > org.postgresql.Driver </ property >
??
< property? name ="connection.url" > jdbc:postgresql://localhost:5432/test </ property > ????
??
< property? name ="connection.username" > root </ property >
??
< property? name ="connection.password" ></ property >
??? MaxDB(SAPDB):
<!----> ?? < property? name ="dialect" > org.hibernate.dialect.SAPDBDialect </ property >
??
?? < property? name ="connection.driver_class" > com.sap.dbtech.jdbc.DriverSapDB </ property >
??
< property? name ="connection.url" > jdbc:sapdb://localhost/test </ property > ????
??
< property? name ="connection.username" > root </ property >
??
< property? name ="connection.password" ></ property >
???


forker 2007-08-21 10:01 發表評論

Hibernate加載其數據庫配置


更多文章、技術交流、商務合作、聯系博主

微信掃碼或搜索:z360901061

微信掃一掃加我為好友

QQ號聯系: 360901061

您的支持是博主寫作最大的動力,如果您喜歡我的文章,感覺我的文章對您有幫助,請用微信掃描下面二維碼支持博主2元、5元、10元、20元等您想捐的金額吧,狠狠點擊下面給點支持吧,站長非常感激您!手機微信長按不能支付解決辦法:請將微信支付二維碼保存到相冊,切換到微信,然后點擊微信右上角掃一掃功能,選擇支付二維碼完成支付。

【本文對您有幫助就好】

您的支持是博主寫作最大的動力,如果您喜歡我的文章,感覺我的文章對您有幫助,請用微信掃描上面二維碼支持博主2元、5元、10元、自定義金額等您想捐的金額吧,站長會非常 感謝您的哦!!!

發表我的評論
最新評論 總共0條評論
主站蜘蛛池模板: 亚洲精品一区二区三区婷婷月色 | 日韩无套 | 日韩专区在线观看 | 日韩深夜视频 | jizzzxxxxhd | 日韩专区在线播放 | 午夜免费观看福利片一区二区三区 | 黄色免费网页 | 婷婷久久综合九色综合九七 | 麻豆porn| 国内精品视频在线观看 | 91亚洲精品一区二区福利 | 日本免费视频在线观看 | 大蕉香蕉久久爱 | 老司机免费福利视频无毒午夜 | 特级毛片免费观看视频 | 亚洲www啪成人一区二区 | 国产成人精品免费视频大全可播放的 | 草草视频在线 | 亚洲看 | 欧美les免费观看网站 | 人人看人人看 | 制服丝袜成人动漫 | 国产成人精品高清在线观看99 | 国产成人福利在线视老湿机 | www.黄色大片 | 亚洲片在线观看 | 日本不卡一区二区三区在线观看 | 亚洲人成在线播放网站 | 国产福利自产拍在线观看 | 九色传媒 | 国产精品福利视频手机免费观看 | 日韩免费观看视频 | 亚洲国产精品久久久久秋霞蜜臀 | 深夜网址你懂的 | 成人黄色网战 | 国产精品欧美亚洲日本综合 | 5060网午夜| 99久久精品久久久久久清纯 | 91最新免费观看在线 | 日韩精品亚洲一级在线观看 |