侧边栏壁纸
  • 累计撰写 1,975 篇文章
  • 累计创建 73 个标签
  • 累计收到 20 条评论

目 录CONTENT

文章目录

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

猿哥
2021-10-27 / 0 评论 / 0 点赞 / 488 阅读 / 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
博主关闭了所有页面的评论