紅線的報錯內容:
Could not autowire. No beans of ‘RestTemplate’ type found. more… (Ctrl+F1)
如圖:
解決方法:在 Intellij Idea中設置一下:
Settings - Editor - Inspections - Spring - Spring Core - Code - Autowiring for Bean Class - disable(idea2017是把√去掉)
紅線的報錯內容:
Could not autowire. No beans of ‘RestTemplate’ type found. more… (Ctrl+F1)
如圖:
解決方法:在 Intellij Idea中設置一下:
Settings - Editor - Inspections - Spring - Spring Core - Code - Autowiring for Bean Class - disable(idea2017是把√去掉)