我是靠谱客的博主 刻苦乐曲,这篇文章主要介绍【已解决】No qualifying bean of type ‘com.obtk.service.StockInfoService‘ available: expected at least,现在分享给大家,希望可以做个参考。

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内容请搜索靠谱客的其他文章。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(60)

评论列表共有 0 条评论

立即
投稿
返回
顶部