【问题标题】:Hibernate configuration file for HSQLDB database serverHSQLDB 数据库服务器的休眠配置文件
【发布时间】:2015-07-14 09:20:23
【问题描述】:

我是休眠编程的新手,我不知道如何为 HSQLDB 数据库服务器编写休眠配置文件。服务器位于本地主机上。

  • 用户名是:michael
  • 密码是:jane$%12#

【问题讨论】:

标签: hibernate web-services configuration hsqldb configuration-files


【解决方案1】:

试试这个:

<?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>
    <property name="hibernate.dialect">org.hibernate.dialect.HSQLDialect</property>
    <property name="hibernate.connection.driver_class">org.hsqldb.jdbcDriver</property>
    <property name="hibernate.connection.url">jdbc:hsqldb:hsql://localhost/</property>
    <property name="hibernate.connection.username">michael</property>
    <property name="hibernate.connection.password">jane$%12#</property>    
    <property name="show_sql">true</property>
    <property name="current_session_context_class">thread</property>
    <mapping resource="yourclassname.hbm.xml"/>
  </session-factory>
</hibernate-configuration>

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2011-08-21
    • 2011-01-23
    • 2013-04-26
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2011-04-05
    • 2017-04-30
    相关资源
    最近更新 更多