核心提示:报错信息:org.springframework.beans.factory.BeanCreationException: Error creating bean with name productS...
报错信息:org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'productService' defined in class path resource [applicationContext.xml]: Cannot resolve reference to bean 'productDao ' while setting bean property 'productDao'; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'productDao ' is defined
我们在配置SSH的时候,整合Spring和Struts2的时候,在applicationcontext。xml配置文件中配置dao,action,service之间的依赖关系,如果你在ref=“aDao ”后面多了一个空格,系统默认就找不到这个路劲就会报上面的这个错误,所以以后遇见这种错误的时候,好好检查有没有多空格或者你的这个依赖名写错了!!!!!!!!!!!