首页 > 其他 > 详细

IntelliJ Idea解决Could not autowire. No beans of 'xxxx' type found的错误提示

时间:2021-08-13 23:12:39      阅读:30      评论:0      收藏:0      [点我收藏+]

在Idea的spring工程里,经常会遇到Could not autowire. No beans of ‘xxxx‘ type found的错误提示。

技术分享图片

原因:第一个是IntellijIDEA本身工具的问题。第二个便是我们导入@Service包的时候导入包错误造成的

解决方案:

1)第一个问题解决方案:将 @Autowired 换成 @Resource

2)第二个问题解决方案:导入@Service包:import org.springframework.stereotype.Service;

转载:https://blog.csdn.net/u012453843/article/details/54906905

IntelliJ Idea解决Could not autowire. No beans of 'xxxx' type found的错误提示

原文:https://www.cnblogs.com/nanao/p/15138857.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!