概述
org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name ‘stockInfoController’: Unsatisfied dependency expressed through field ‘stockInfoService’; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type ‘com.obtk.service.StockInfoService’ available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)}
出现这种情况,看自己的service层上是否有@service注解,将service自动注入
如果不是使用注解的话,就看xml配置文件中是否有service的bean注入
最后
以上就是刻苦乐曲为你收集整理的【已解决】No qualifying bean of type ‘com.obtk.service.StockInfoService‘ available: expected at least的全部内容,希望文章能够帮你解决【已解决】No qualifying bean of type ‘com.obtk.service.StockInfoService‘ available: expected at least所遇到的程序开发问题。
如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。
发表评论 取消回复