开发是遇到了这个错误,网上说jar包冲突,其实没有。说路径不对也没有。找大侠解决。谢谢。
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'transactionInterceptor' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Cannot resolve reference to bean 'transactionManager' while setting bean property 'transactionManager'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'transactionManager' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Cannot resolve reference to bean 'sessionFactory' while setting bean property 'sessionFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Invocation of init method failed; nested exception is org.hibernate.MappingException: An association from the table bulletin refers to an unmapped class: com.topwalk.oa.personnel.bulletin.bo.Department
------解决方案--------------------
hibernate.MappingException: An association from the table bulletin refers to an unmapped class: com.topwalk.oa.personnel.bulletin.bo.Department
Department的映射文件有问题,仔细比较一下这个bean和映射文件和数据库中的这个表。
------解决方案--------------------
com.topwalk.oa.personnel.bulletin.bo.Department
记得写上默认的构造函数 public Department(){}