zoukankan      html  css  js  c++  java
  • 启动springboot的项目的时候报错 Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.

    启动springboot项目报错
    提示:`**Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
    2020-12-19 12:52:45.406 ERROR 18460 --- [ restartedMain] o.s.b.d.LoggingFailureAnalysisReporter :


    APPLICATION FAILED TO START


    Description:

    Failed to configure a DataSource: 'url' attribute is not specified and no embedded datasource could be configured.

    Reason: Failed to determine a suitable driver class

    Action:

    Consider the following:
    If you want an embedded database (H2, HSQL or Derby), please put it on the classpath.
    If you have database settings to be loaded from a particular profile you may need to activate it (no profiles are currently active).
    **`

    因为我们手动配置了数据源,导致项目去自动配置的时候出现问题
    所以解决办法:在启动配置上面加上@SpringBootApplication(scanBasePackages = {"com.xhl"},exclude = {DataSourceAutoConfiguration.class})
    这样就排除自动配置,启动的时候找我们手动配置的数据库连接

    踏踏实实的走,每一步都算数
  • 相关阅读:
    linux下使用kermi续
    关于vhdl中integer消耗资源的一些讨论
    linux时间编程
    Linux下C编程文件编程
    C语言I博客作业04
    C语言I博客作业02
    C语言I博客作业02
    第一周作业
    php 面向对象
    php 面向对象封装和继承
  • 原文地址:https://www.cnblogs.com/keepstudy-xiahl/p/14158790.html
Copyright © 2011-2022 走看看