@RequiredArgsConstructor(onConstructor = @__(@Autowired)) Intellij IDEA如何去掉@Autowired 注入警告的方法

問題 在Service層注入Mybatis的Mapper我們通常會使用@Autowired 自動注入 1 2 @Autowired private ProductMapper productMapper; 但是這樣Intellij IDEA會顯示紅色告警,提示不能自動注入。 當我們在Controller層注入Service時我們也經常直接在Filed上使用@Autowired 註解,這時候不顯示紅
相關文章
相關標籤/搜索