hibernate里执行junit提示这样的错
<?xml version="1.0"?> <!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd"> <!-- Generated 2016-4-14 14:39:20 by Hibernate Tools 3.4.0.CR1 --> <hibernate-mapping> <class name="hibernate.Students" table="STUDENTS"> <id name="sid" type="int"> <column name="SID" /> <generator class="native" /> </id> <property name="sname" type="java.lang.String"> <column name="SNAME" /> </property> <property name="gender" type="java.lang.String"> <column name="GENDER" /> </property> <property name="birthday" type="java.util.Date"> <column name="BIRTHDAY" /> </property> <component name="address" class="Address"> <property name="postcode" column="POSTCODE"></property> <property name="phone" column="PHONE"></property> <property name="address" column="ADDRESS"></property> </component> </class> </hibernate-mapping>
这个错是因为啥了,我和视频写的一模一样呀
org.hibernate.InvalidMappingException: Could not parse mapping document from resource Students.hbm.xml