ssh报 HTTP Status 500 - Unable to instantiate Action, com.web.action.UserAction, defined for 'login'

来源:互联网 发布:千牛mac beta 编辑:程序博客网 时间:2024/06/05 21:17

S2SH项目报错:

          HTTP Status 500 - Unable to instantiate Action, com.web.action.UserAction, defined for 'login' in namespace '/user'Error creating bean with name 'com.web.action.UserAction': Injection of resource dependencies failed; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type [com.service.UserService] found for dependency: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {@javax.annotation.Resource(shareable=true, mappedName=, description=, name=, type=class java.lang.Object, authenticationType=CONTAINER, lookup=)}

        

         这是因为依赖注入失败了,检查每个类的依赖注入,如果的注解的话,每个实现类上要注入@Repository("userService")这里的名字要和调用它的类中实例名一样.

1 0
原创粉丝点击