Intellij Idea开发工具在controller层@Autowired注入userMapper时报出如下错误。
Could not autowire. No beans of 'UserMapper' type found. less... (Ctrl+F1)Checks autowiring problems in a bean class.
解决方法如下,在 Intellij Idea中设置一下:
Settings - Editor - Inspections - Spring - Spring Core - Code - Autowiring for Bean Class - disable(不可用)