最近测试一个项目,启动项目的时候一直出现如下的提示:Caused by:org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type [com.chainmobile.test.service.LoginService] found for dependency: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations:
把service注解到interface上面了,后来在网上查找了部分资料发现需要把这个放到service的实现类上,换完位置,启动项目,程序就正常了。
No qualifying bean of type [..] found for dependency
最新推荐文章于 2024-07-23 11:15:50 发布