您现在的位置:首页 >> 前端 >> 内容

配置SSH的时候,整合struts2和spring的时候,bean一直报defind

时间:2017/2/13 9:21:55 点击:

  核心提示:报错信息: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 ”后面多了一个空格,系统默认就找不到这个路劲就会报上面的这个错误,所以以后遇见这种错误的时候,好好检查有没有多空格或者你的这个依赖名写错了!!!!!!!!!!!

Tags:配置 置S SS SH 
作者:网络 来源:qq_3284487