- <!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.connection.url">
- <!-- sql连接的注意!localhost:1433;DataBaseName=数据库名; -->
- jdbc:microsoft:sqlserver://localhost:1433;DataBaseName=journal;
- </property>
- <property name="hibernate.connection.driver_class">
- com.microsoft.jdbc.sqlserver.SQLServerDriver
- </property>
- <property name="hibernate.connection.username">sa</property>
- <property name="hibernate.connection.password">123</property>
- <property name="hibernate.dialect">
- org.hibernate.dialect.SQLServerDialect
- </property>
- <property name="hibernate.show_sql">true</property>
- <!-- 映射实体配置文件 -->
- <mapping resource="com/journal/bean/Jbean.hbm.xml" />
- </session-factory>
- </hibernate-configuration>
hibernate.cfg.xml连接Sql2000参考代码
最新推荐文章于 2023-04-28 09:08:27 发布