目 录CONTENT

文章目录

Spring Boot Junit启动报错:springboot启动报错:Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualif...

大T
2021-10-27 / 0 评论 / 0 点赞 / 51 阅读 / 0 字
Spring Boot项目的Junit中变量提示无法自动装配

运行报错:

Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'com.devtao.study.service.PersonService' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)}

解决:

在测试类上加上组建扫描Annation


0

评论区