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

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

解决方法:

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

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

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

原文地址:https://www.cnblogs.com/share-record/p/12198253.html