IDEA:Could not autowire. No beans of '***' type found. Checks autowiring problems in a bean class

报错:Could not autowire. No beans of '***' type found. Checks autowiring problems in a bean class

今天写controller层代码,注入时红线提示,项目能正常运行。百度查找原因都是说修改报错等级,但是不想,有点强迫症。仔细查看自己的代码,发现是我没有写@Service 注解。正常来说,是不会有这种红线提示的,所以下次出现这样情况的时候,请查看自己的注解是不是都写好了,会不会忘了。

发布了22 篇原创文章 · 获赞 3 · 访问量 1万+

猜你喜欢

转载自blog.csdn.net/qq_41623154/article/details/101305046
今日推荐