• 启动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})
    这样就排除自动配置,启动的时候找我们手动配置的数据库连接

    踏踏实实的走,每一步都算数
  • 相关阅读:
    [NOIP2015] 子串 题解
    [NOIP2011] 聪明的质检员 题解
    二进制的一些概念
    [NOIP2012] 借教室 题解
    [POJ3764] The XOR Longest Path 题解
    关于本博客
    【SC-MY限定】让填写问卷星成为自动化!
    JZOJ5833 永恒
    九校联考-DL24凉心模拟Day2总结
    【简解】SP7556 Stock Charts
  • 原文地址:https://www.cnblogs.com/keepstudy-xiahl/p/14158790.html
Copyright © 2020-2023  润新知