其他分享
首页 > 其他分享> > IntelliJ Idea解决Could not autowire. No beans of 'xxxx' type found的错误提示

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

作者:互联网

在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

标签:xxxx,IntelliJ,Service,No,解决方案,导入,autowire,type
来源: https://www.cnblogs.com/nanao/p/15138857.html