The content of element type "session-factory" must match "(property*,mapping*,(c
下面是我的hibernat.cfg.xml 不知哪里错了 myeclipse 老是提示错误
<!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.driver_class">com.microsoft.jdbc.sqlserver.SQLServerDriver</property>
<property name="hibernate.connection.url">
jdbc:microsoft:sqlserver://127.0.0.1:1433;DatabaseName=spring_hibernate2;SelectMethod=cursor;
</property>
<property name="hibernate.connection.username">sa</property>
<property name="hibernate.connection.password"></property>
<property name="hibernate.dialect">org.hibernate.dialect.SQLServerDialect</property>
<property name="hibernate.show_sql">true</property>
<property name="hibernate.hbm2ddl.auto">update</property>
<property name="cache.use_second_level_cache">true</property>
<class-cache class="domain.Person" usage="read-write"/>
<property name="cache.provider_class">org.hibernate.cache.OSCacheProvider</property>
<mapping resource="domain/Person.hbm.xml" />
<mapping resource="domain/Department.hbm.xml" />
<mapping resource="domain/Employee.hbm.xml" />
<mapping resource="domain/IdCard.hbm.xml" />
<mapping resource="domain/Citizen.hbm.xml" />
<mapping resource="domain/Student.hbm.xml" />
<mapping resource="domain/Teacher.hbm.xml" />
</session-factory>
</hibernate-configuration>