idea 如何關閉 field injection is not recommended 警告

idea中有很多代碼檢查機制,比如命名是否遵循駝峯規則,是否有冗餘代碼,是否有魔法值等等,在依賴注入時,直接使用@Autowired註解進行注入時,可能會出現黃色小波浪線,提示你:field injection is not recommended 不推薦使用屬性(變量)注入方式。 打開setting-->Editor-->inspections-->Spring-->Code-->Filed i
相關文章
相關標籤/搜索