码迷,mamicode.com
首页 > 移动开发 > 详细

springboot 数据库出现 Consider defining a bean of type 'com.jc.wechat.app.dao.ClientRepository' in your configuration. 解决办法

时间:2020-01-02 13:07:16      阅读:209      评论:0      收藏:0      [点我收藏+]

标签:图片   roc   引入   image   defining   point   完整   框架   efi   

错误日志完整:

  

Error starting ApplicationContext. To display the conditions report re-run your application with ‘debug‘ enabled.
2020-01-02 12:50:10.767 ERROR 8624 --- [ main] o.s.b.d.LoggingFailureAnalysisReporter :

***************************
APPLICATION FAILED TO START
***************************

Description:

Field clientRepository in com.jc.wechat.app.service.impl.ClientServiceImpl required a bean of type ‘com.jc.wechat.app.dao.ClientRepository‘ that could not be found.

The injection point has the following annotations:
- @org.springframework.beans.factory.annotation.Autowired(required=true)


Action:

Consider defining a bean of type ‘com.jc.wechat.app.dao.ClientRepository‘ in your configuration.


Process finished with exit code 1

解决办法:

在框架的启动文件加入扫描包路径

@ComponentScan(basePackages = "com.jc.wechat.app.dao") //引入dao根路径

技术图片

springboot 数据库出现 Consider defining a bean of type 'com.jc.wechat.app.dao.ClientRepository' in your configuration. 解决办法

标签:图片   roc   引入   image   defining   point   完整   框架   efi   

原文地址:https://www.cnblogs.com/pxjbk/p/12132336.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!