Idea解决Could not autowire. No beans of ‘xxxx’ type found的错误提示

更新了idea版本之后,在使用autowired注解都爆了错,虽然发觉不影响使用,但是看着红红的一片就十分别扭,以下有两种解决方案

1:修改idea对auto错误的警告级别
Idea解决Could not autowire. No beans of ‘xxxx‘ type found的错误提示
改成warning就不会报错了

2:造成这个问题的原因是没有将bean注入,可以在接口上加上注释
Idea解决Could not autowire. No beans of ‘xxxx‘ type found的错误提示

相关文章:

猜你喜欢
  • 2021-05-29
  • 2021-06-17
相关资源
相似解决方案