ApplicationContext 报错
2019-01-21 本文已影响0人
朗朗乾坤_河里有鱼
Could not autowire. No beans of 'ApplicationContext' type found. less... (Ctrl+F1)
Inspection info:Checks autowiring problems in a bean class.
![](https://img.haomeiwen.com/i15086651/38584ab8c3165580.png)
在Idea的spring工程里,经常会遇到Could not autowire. No beans of 'xxxx' type found的错误提示。但程序的编译和运行都是没有问题的,这个错误提示并不会产生影响。
原因可能有两个,
第一个是IntellijIDEA本身工具的问题。
第二个便是我们导入@ApplicationContext包的时候导入包错误造成的
我这里就是第二个原因,导包错误。
![](https://img.haomeiwen.com/i15086651/fbbbc2f0bfce9893.png)