当你写完项目的时侯serviceimpl层下的@autowire->对应的是dao层的注入,其下面会出现一条红线
在Intellij Idea开发工具在@Autowired或者@Resource注入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://www.cnblogs.com/jiaxiaoyang/p/10240537.html
时间: 2024-11-12 22:34:41