spring mvc 报错found for dependency: expected at least 1 bean which qualifies as autowire candidate fo

来源:互联网 发布:软件源码提取 编辑:程序博客网 时间:2024/05/03 17:05
No matching bean of type [com........] found for dependency: expected at least 1 bean which qualifies as autowire candidate for this dependency.

自动注入的时候,找不到对应的bean
 
原因是:对应要注入的实现类没有 加注解,如service层  @Service