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

问题 在Service层注入Mybatis的Mapper我们通常会使用@Autowired 自动注入 1 2 @Autowired private ProductMapper productMapper; 但是这样Intellij IDEA会显示红色告警,提示不能自动注入。 当我们在Controller层注入Service时我们也经常直接在Filed上使用@Autowired 注解,这时候不显示红
相关文章
相关标签/搜索