- IDEA编辑器的小脾气(could not autowire)
- IDEA | 解决 Could not autowire. No
- 在Idea的spring工程里,经常会遇到Could not a
- Could not autowire. No beans of
- 使用idea遇到Could not autowire. No b
- IntelliJ Idea解决Could not autowir
- Error:(640, 61) Could not autowi
- Spring + Maven + Mybatis + Sprin
- 解决IDEA报错Could not autowire. Ther
- IntelliJ IDEA Could not autowire
springboot集成mybatis的时候用到这个:
@Resource
private UserMapper userMapper;
或者这个:
@Autowired
private UserMapper userMapper;
如果使用的是 Idea,这块的注解经常会报“could not autowire”,Eclipse 却没有问题,其实代码是正确的,这是 Idea 的误报。
下面一招教你解决误报抛红
单击 File | Settings | Editor | Inspections 命令,使用搜索功能找到Autowiring for Bean Class 选项,将 Severity 的级别由之前的 error 改成 warning 即可。
![](https://img.haomeiwen.com/i6765210/8c0c739c6a72dfb9.png)
网友评论