问题描述
***************************
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).
Process finished with exit code 0
问题分析
- 检查指定配置文件名,无错,且全称,无问题
- 检查数据库连接配置,内容无错,无问题
- 从
Application
分析,发现问题,需要排除此类的autoconfig
解决方案
@SpringBootApplication(exclude = {DataSourceAutoConfiguration.class})