Could not autowire. No beans of 'UserMapper' type found.

妖狐艹你老母 2022-05-29 11:16 387阅读 0赞

Intellij Idea开发工具在@Autowired注入XxxMapper接口时报如下错误:

Could not autowire. No beans of ‘XxxMapper’ 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(把√去掉)

引用:https://blog.csdn.net/xxw1995823/article/details/78620785

发表评论

表情:
评论列表 (有 0 条评论,387人围观)

还没有评论,来说两句吧...

相关阅读