lvhaowen的gravatar头像
lvhaowen 2016-05-25 15:30:45

spring抛出异常:org.springframework.beans.factory.BeanCreationException: Could not autowire method如何解决?

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'userController': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire method: public java.util.Map com.tmhome.mall.web.UserController.login(java.lang.String,java.lang.String,javax.servlet.http.HttpSession,javax.servlet.http.HttpServletResponse,javax.servlet.http.HttpServletRequest); nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type [java.lang.String] found for dependency: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {}

所有回答列表(1)
禅之禅的gravatar头像
禅之禅  LV9 2016年5月26日

自己看下 在你的userController 里的注入错误,你的class 名 怎么小写 开头的啊

用的 mybaits 框架 ,生成包的时候 搞得?

评论(0) 最佳答案
顶部 客服 微信二维码 底部
>扫描二维码关注最代码为好友扫描二维码关注最代码为好友