Error creating bean with name 'sessionFactory' defined in class path resource [applicationContext.xm

用.hbm.xml的Mapping配置方式 根据抛出的异常:Association references unmapped class: com.hcrm.bean.ComplaintInfo,说明你的配置中有一个关联映射,
应该在某个类中,有个声明为ComplainInfo属性,它对com.hcrm.bean.ComplaintInfo有依赖,而你又没有将这个com.hcrm.bean.ComplaintInfo加入到Hibernate的映射配置中,
建议你检查下hibernate.cfg.xml文件,将<mapping class="com.hcrm.bean.ComplaintInfo" />加入sessionFactory的配置内。
总之错误原因在hbm.xml映射文件与对应的bean文件中
原文地址:https://www.cnblogs.com/thesnail/p/3844360.html