在做SpringMVC的时候出现 nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type ‘com.zzti.service.NewsTopicService’ available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)}错误我排查的顺序如下:
1)applicationContext.xml文件中是否配置节点
2)在web.xml中是否配置监视器
3)节点得id是否出现错误
这三个排查清楚基本就可以解决这个问题了