1. 程式人生 > 實用技巧 >解決Could not autowire. No beans of ‘xxxx‘ type found問題

解決Could not autowire. No beans of ‘xxxx‘ type found問題

遇到Could not autowire. No beans of ‘xxxx’ type found的錯誤提示

在Idea的spring工程裡,經常會遇到Could not autowire. No beans of ‘xxxx’ type found的錯誤提示。但程式的編譯和執行都是沒有問題的,這個錯誤提示並不會產生影響。

在這裡插入圖片描述

解決方案

在這裡插入圖片描述
降低Autowired檢測的級別,將Severity的級別由之前的error改成warning或其它可以忽略的級別。