Could not autowire. No beans of 'ApplicationContext' type found. less... (Ctrl+F1)
Inspection info:Checks autowiring problems in a bean class.
在Idea的spring工程里泻帮,經(jīng)常會(huì)遇到Could not autowire. No beans of 'xxxx' type found的錯(cuò)誤提示饿自。但程序的編譯和運(yùn)行都是沒有問題的志珍,這個(gè)錯(cuò)誤提示并不會(huì)產(chǎn)生影響。
原因可能有兩個(gè),
第一個(gè)是IntellijIDEA本身工具的問題。
第二個(gè)便是我們導(dǎo)入@ApplicationContext包的時(shí)候?qū)氚e(cuò)誤造成的
我這里就是第二個(gè)原因,導(dǎo)包錯(cuò)誤痪寻。