zoukankan      html  css  js  c++  java
  • springboot 数据库出现 Consider defining a bean of type 'com.jc.wechat.app.dao.ClientRepository' in your configuration. 解决办法

    错误日志完整:

      

    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根路径

  • 相关阅读:
    关于JAVA的线程问题
    Java 对JTextField添加回车响应
    Failed to install *.apk on device 'emulator-5554': timeout .
    静态属性
    类与对象的实例属性

    面向对象2
    面向对象设计
    re模块,主要用来查询
    xml对标签操作,
  • 原文地址:https://www.cnblogs.com/pxjbk/p/12132336.html
Copyright © 2011-2022 走看看