hibernate.cfg.xml这样写对不对
<?xml version='1.0' encoding='utf-8'?>
<!DOCTYPE hibernate-configuration
PUBLIC "-//Hibernate/Hibernate Configuration DTD//EN"
"http://hibernate.sourceforge.net/hibernate-configuration-2.0.dtd">
<hibernate-configuration>
<session-factory>
<property name="hibernate.connecttion.url">
jdbc:microsoft:sqlserver://127.0.0.1:1433;DatabaseName=pubs
</property>
<property name="hibernate.connection.drive_clalss">
com.microsoft.jdbc.sqlserver.SQLServerDriver
</property>
<property name="hibernate.connection.username">sa</property>
<property name="hibernate.connection.password"></property>
<property name="hibernate.show_sql">true</property>
<property name="dialect">net.sf.hibernate.dialect.SQLServerDialect</property>
<property name="hibernate.use_outer_join">true</property>
<property name="hibernate.transaction.factory_class">
net.sf.hibernate.transaction.JDBCTransactionFactory
</property>
<!-- Mapping files -->
<mapping resource="User.hbm.xml"/>
</session-factory>
</hibernate-configuration>
运行时在TOMCAT的命令行窗口中说:
……
警告:No connection properties specified - the user must supply JDBC connections
本人刚学hibernate,想做个小例子,却碰到问题,还请大侠们多多指教,不胜感激!