【发布时间】:2015-07-14 09:20:23
【问题描述】:
我是休眠编程的新手,我不知道如何为 HSQLDB 数据库服务器编写休眠配置文件。服务器位于本地主机上。
- 用户名是:michael
- 密码是:jane$%12#
【问题讨论】:
标签: hibernate web-services configuration hsqldb configuration-files
我是休眠编程的新手,我不知道如何为 HSQLDB 数据库服务器编写休眠配置文件。服务器位于本地主机上。
【问题讨论】:
标签: hibernate web-services configuration hsqldb configuration-files
试试这个:
<?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>
【讨论】: