奇葩的Failed to configure a DataSource: 'url' attribute is not specified and no embedded dataso

Posted share-record

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了奇葩的Failed to configure a DataSource: 'url' attribute is not specified and no embedded dataso相关的知识,希望对你有一定的参考价值。

技术图片

 

 

 启动springboot的时候莫名其妙出现这个错误,我properties里面也没配置数据源啥的,但就是出现这个错误

解决方法:

在启动类上加@SpringBootApplication(exclude= {DataSourceAutoConfiguration.class})

即在@SpringBootApplication上加(exclude= {DataSourceAutoConfiguration.class})

其他因为数据源的问题出现的这个错误网上好多,这里不赘述。

以上是关于奇葩的Failed to configure a DataSource: 'url' attribute is not specified and no embedded dataso的主要内容,如果未能解决你的问题,请参考以下文章

struts报错严重: Dispatcher initialization failed Unable to load configuration.

Failed to upgrade Oracle Cluster Registry configuration(root.sh)

springboot启动报错:Failed to configure a DataSource

安装Intel HAXM:"failed to configure driver unknown error. failed to open driver"

Failed to configure a DataSource 'url' attribute问题解决

Springboot Failed to configure a DataSource: ‘url‘ attribute is not specified and no embedded