<?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"><!-- Generated by MyEclipse Hibernate Tools.                   -->
<hibernate-configuration><session-factory>
<property name="connection.username">root</property>
<property name="connection.url">
jdbc:mysql://localhost/netharddisk
</property>
<property name="dialect">
org.hibernate.dialect.MySQLDialect
</property>
<property name="connection.password">123456</property>
<property name="connection.driver_class">
org.gjt.mm.mysql.Driver
</property>
<property name="show_sql">true</property>
<mapping resource="NhdConfig.hbm.xml" />
<mapping resource="NhdDownloadrecord.hbm.xml" />
<mapping resource="NhdFilesystem.hbm.xml" />
<mapping resource="NhdFoldertree.hbm.xml" />
<mapping resource="NhdLeavewords.hbm.xml" />
<mapping resource="NhdSpaces.hbm.xml" />
<mapping resource="NhdUsers.hbm.xml" /></session-factory></hibernate-configuration>
除可配置文件外我还需要改什么。希望可以帮忙。要看源码的可以问我要。谢谢大家

解决方案 »

  1.   

    改这几个,网上找例子应该有不少
    如果没有特别的用法,比如自己写的sql语句,应该挺容易换库的吧(理论上)
    方言
    <property name="dialect">
    org.hibernate.dialect.MySQLDialect
    </property>驱动器
    <property name="connection.driver_class">
    org.gjt.mm.mysql.Driver
    </property>
    连接字符串
    <property name="connection.url">
    jdbc:mysql://localhost/netharddisk
    </property>另外当然还有登录地址、用户、密码等等
      

  2.   

    不要忘记把那三个mssql驱动jar包导入