<bean ></property>
</bean>
//*************************************************************************************************************************
上面这段配置中一直抛出一下异常
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in class path resource [spring/applicationContext.xml]: Invocation of init method failed; nested exception is org.hibernate.InvalidMappingException: Unable to read XML
弄了一上午也找不到原因,头都炸了
后面看到一个贴说是*.hbm.xml 中内容有错,我就一行一行检查,可是还是没发现有什么错误,最后。。。。。。最后,竟然是因为dtd后面多以一个空格导致的
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://www.hibernate.org/dtd/hibernate-mapping-3.0.dtd ">把dtd后面的空格删除,就把问题解决了