java - xxx.hbm.xml not found but it actually exists -
i error when run tomcat:
caused by: org.springframework.beans.factory.beancreationexception:
error creating bean name 'sessionfactory' defined in class path resource [beans.xml]: invocation of init method failed; nested exception is
org.hibernate.mappingnotfoundexception: resource:
com/itheima/elec/domain/electext.hbm.xml not found
but exists in project:
and in hibernate configuration below:
<session-factory> ... <mapping resource="com/itheima/elec/domain/electext.hbm.xml"/> <mapping resource="com/itheima/elec/domain/eleccommonmsg.hbm.xml"/> </session-factory>
i don't know issue is, can friend me?
please use @annotations classes inside domain folder,then no need use hbm.xml files. after in hibernate.cfg.xml file use ''
Comments
Post a Comment