严重: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'managerController': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: com.litt.nic.Service.managerService com.litt.nic.Controller.managerController.managerservice; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'managerService': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: com.litt.nic.Service.managerService com.litt.nic.ServiceImpl.managerServiceImpl.managerservice; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type [com.litt.nic.Service.managerService] found for dependency: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)}
@service()
@controller
都有
managerController 这个类依赖注入失败,com.litt.nic.Service.managerService这个接口或者这个接口的实现类有问题
这个问题应该是在服务启动的时候springcontext容器没有初始化加载,你看一下web.xml文件,是不是没有配置spring容器监听
managerService 的实现类没有加入@Service
贴一下代码看看吧。。。。。。。。。。。。。。。
也可能是spring配置文件中扫描包的路径没有扫描到吧
建议检查一下的配置文件
贴managerController的代码吧