学无先后,达者为师

网站首页 编程语言 正文

A component required a bean of type ‘xxx‘ that could not be found.

作者:天真吖415 更新时间: 2023-07-18 编程语言

原因:spring boot注入失败

解决:

1.springboot扫描的范围是与启动类同级别的包

2.若在同一模块,检查是否加上了IOC注解

3.若不在同一模块,在启动类加上包扫描 @ComponentScan("xxx")

原文链接:https://blog.csdn.net/qq_59384418/article/details/130160149

  • 上一篇:没有了
  • 下一篇:没有了
栏目分类
最近更新