Debug - SpringBoot - Error starting ApplicationContext. To display the auto-configuration report re-
别裁伪体亲风雅,转益多师是汝师。这篇文章主要讲述Debug - SpringBoot - Error starting ApplicationContext. To display the auto-configuration report re-相关的知识,希望能为你提供帮助。
Error log
2019-12-07 22:33:03.959 ERROR 3760 --- [main] 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
Solution在SpringBootApplication后加(exclude=DataSourceAutoConfiguration.class),原因是加载了数据库依赖而没有写配置文件
/** * starter of spring boot */ @SpringBootApplication(exclude=DataSourceAutoConfiguration.class) public class DemoApplication { public static void main(String[] args) { SpringApplication.run(DemoApplication.class, args); }}
【Debug - SpringBoot - Error starting ApplicationContext. To display the auto-configuration report re-】
推荐阅读
- app.use与app.get的区别及解析
- pandas.apply()函数
- 关闭centos大页及swappiness
- android studio的Gradle一直在sync的办法
- AS中加载gradle时出现Gradle sync failed: Could not find com.android.tools.build:gradle.的错误
- 关于 android.view.WindowLeaked: 窗体泄露
- 获取SpringMVC中所有RequestMapping映射URL信息
- FCC---CSS Flexbox: Apply the flex-direction Property to Create Rows in the Tweet Embed
- FCC---CSS Flexbox: Apply the flex-direction Property to Create a Column in the Tweet Embed